News & Announcements User Community Developer Community

Welcome to the RingCentral Community

Please note the community is currently under maintenance and is read-only.

Search
Make sure to review our Terms of Use and Community Guidelines.
  Please note the community is currently under maintenance and is read-only.
Home » Developers
Password to Oauth2.0
Tags: oauth2
Feb 9, 2024 at 11:36am   •   1 replies  •  0 likes
Ismael Torres

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.

1 Answer
answered on Feb 9, 2024 at 11:53am  

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.


 0
on Feb 9, 2024 at 12:13pm   •  0 likes

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.

on Feb 9, 2024 at 12:47pm   •  0 likes

What is the app client id?

on Feb 9, 2024 at 3:53pm   •  0 likes

Hi, is there an update on this? Thank you

on Feb 9, 2024 at 1:35pm   •  0 likes

0eLTUWdZfWzd1aTmBEUteZ

on Feb 9, 2024 at 3:49pm   •  0 likes

The app auth type is set to JWT flow correctly, so I am sure that something is wrong in your Postman body params. However, the app does not have any scope (app permission)? Check the API you want to call from the API reference to see what app permission does it require and add that scope to your app.

1707522542844.png

For testing with Postman, use this public collection

on Feb 9, 2024 at 4:42pm   •  0 likes

Thank you for your help the issue has been fixed by leveraging the sample file you provided. I was passing the parameters as part of the URL and not as part of the Body.



A new Community is coming to RingCentral!

Posts are currently read-only as we transition into our new platform.

We thank you for your patience
during this downtime.

Try Workflow Builder

Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!

Try RingCentral Workflow Builder

PRODUCTS
RingEX
Message
Video
Phone
OPEN ECOSYSTEM
Developer Platform
APIs
Integrated Apps
App Gallery
Developer support
Games and rewards

RESOURCES
Resource center
Blog
Product Releases
Accessibility
QUICK LINKS
App Download
RingCentral App login
Admin Portal Login
Contact Sales
© 1999-2024 RingCentral, Inc. All rights reserved. Legal Privacy Notice Site Map Contact Us