Reputation: 327
When I use this api to get access token: https://oauth-login.cloud.huawei.com/oauth2/v3/token?grant_type=client_credentials&client_id=****&client_secret=**** it always returns
{
"sub_error": 20001,
"error_description": "missing required parameter: client_id",
"error": 1102 }
although I send client_id parameter
Upvotes: 1
Views: 979
Reputation: 2025
Please use the following scheme instead for oath authentication:
If you don't give this a valid client_id it will say that you have a "invalid client_id" instead of saying it's empty. Hope this helps. (The change is that the original says .../token? and this says .../authorize?)
Upvotes: 0
Reputation: 327
To solve the issue, Please make sure the below points
You are doing post request to the server
Make sure that the POST URL is “https://oauth-login.cloud.huawei.com/oauth2/v3/token”. Do not include post parameters in the URL
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:
Upvotes: 1