HUAWEI Push - API for obtaining an access token not working

Viewed 395
2 Answers

To solve the issue, Please make sure the below points

  1. You are doing post request to the server

  2. Make sure that the POST URL is “https://oauth-login.cloud.huawei.com/oauth2/v3/token”. Do not include post parameters in the URL

  3. Add below parameters in body of POST request but not in the URL as mentioned here ( https://oauth-login.cloud.huawei.com/oauth2/v3/token?grant_type=client_credentials&client_id=****&client_secret=**** )

grant_type=client_credentials

client_id=****

client_secret=****

For more details about fetching the access token, please refer the below link:

https://developer.huawei.com/consumer/en/doc/development/HMSCore-Guides-V5/open-platform-oauth-0000001053629189-V5#EN-US_TOPIC_0000001053629189__section12493191334711

Related