Question

Curl restapi/oauth/token "errorCode" : "OAU-251", "message" : "Unauthorized for this grant type"

  • 7 December 2017
  • 2 replies
  • 7257 views

we have try to get auth token from RingCentral auth token(/restapi/oauth/token) by using CURL call but we have get

curl -X POST "https://platform.devtest.ringcentral.com/restapi/oauth/token" -H "Accept: application/json" -H "Content-Type: application/x-www-form-urlencoded" -u "clineId:clientpassword" -d "username=username&password=password&extension=101&grant_type=password"<br>

2 replies

curl -i -X POST "https://platform.devtest.ringcentral.com/restapi/oauth/token";
-H "Accept: application/json"
-H "Content-Type: application/x-www-form-urlencoded"
-u "appId:appSecret"
-d "username=username&password=password&extension=&grant_type=password"

Above is what I have tested

I think what you posted is correct. Because it is the same as mine.

Make sure the application you created supports Password flow since your (grant_type=password) .

Please note here, application created with different platform type will have different grant_type.

for more info, here is wonderful way it has answered with animated Gif image that will easily help you to understand the process:

https://stackoverflow.com/questions/47692828/ringcentral-auth-token-failed-in-curl-call-unauthorized-for-this-grant-type/47745436#47745436

Reply