Skip to main content
Solved

Password to Oauth2.0


  • Participating Frequently

I have been using the password flow just fine, however RingCentral will deprecate it and I am moving to Oauth2.0. However I am running into issue and I keep getting the error OAU-250 Unsupported grant type.

This is the URL I am using:
POST Request: https://platform.ringcentral.com/restapi/oauth/token

Params:

grant_type = authorization_code

redirect_uri = url

code = code gotten back from the url

client_id = client_id


Headers:

Content-Type = application/x-www-form-urlencoded

Accept = application/json

Authorization = Basic (base64encode"clientid:clientsecret")

Any feedback is well appreciated.

Best answer by PhongVu

Normally you should migrate from Password flow to JWT flow, which is kind of equivalent and suitable for Server/No UI app platform type.

If you really want to change the authentication to OAuth 2.0 code flow, the best option is to register a new app with code flow with a specified the Redirect URI and you will need to implement extra code to handle the authorization.

View original
Did this thread help you find an answer to your question?

PhongVu
Community Manager
Forum|alt.badge.img
  • Community Manager
  • February 9, 2024

Normally you should migrate from Password flow to JWT flow, which is kind of equivalent and suitable for Server/No UI app platform type.

If you really want to change the authentication to OAuth 2.0 code flow, the best option is to register a new app with code flow with a specified the Redirect URI and you will need to implement extra code to handle the authorization.


  • Participating Frequently
  • February 9, 2024

Ok I updated, the settings of my console to use JWT, I then using Postman (for testing) used this URL: https://platform.ringcentral.com/restapi/oauth/token

POST Request


Headers:

Content-Type = application/x-www-form-urlencoded

Authorization = Basic (base64encode"clientid:clientsecret")


Params:

assertion = my JWT token I generated under credentials

grant_type = urn:ietf:params:oauth:grant-type:jwt-bearer

( Note I also tried : grant_type = urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Ajwt-bearer )


However this is the error I get which is the exact same error I got when using OAuth 2.0:


{ "error": "invalid_request", "errors": [ { "errorCode": "OAU-250", "message": "Unsupported grant type" } ], "error_description": "Unsupported grant type"}


I am using cURL, because I am using the FileMaker platform, thanks in advance for any advice.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings