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

  • 1
  • Problem
  • Updated 1 year ago
  • (Edited)
 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>
Photo of Robert Raj

Robert Raj

  • 152 Points 100 badge 2x thumb

Posted 1 year ago

  • 1
Photo of Tyler Long

Tyler Long, Official Rep

  • 8,502 Points 5k badge 2x thumb
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.
(Edited)