Skip to main content
The First Step
December 7, 2017
Question

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

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>

6 replies

Employee
December 8, 2017
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.
The First Step
June 18, 2019

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

Please note, 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 proccess: https://stackoverflow.com/questions/47692828/ringcentral-auth-token-failed-in-curl-call-unauthorized-for-this-grant-type/47745436#47745436

The First Step
June 23, 2019

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

Please note, 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 proccess:

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

The First Step
July 4, 2019

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

Please note, 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 proccess:

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

The First Step
July 6, 2019

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

Please note, 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 proccess:

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

The First Step
July 6, 2019

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