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
Unable to Authorize to the ringcentral using restapi/oauth/token API
Tags: oauth2
Nov 14, 2023 at 6:21am   •   2 replies  •  0 likes
sattar k

Hello,

We are using the endpoint (https://platform.devtest.ringcentral.com/restapi/oauth/token?username=19294732631&password=****&extension=101&grant_type=password) to get the access token in the response.

In header I am passing some information and in the value of Authorization is passed in (Basic + base64_encoded(Client ID : Client Secret) format.

1699969847763.png

I am getting the error invalid_client.

1699971495740.png

Can you suggest us, how to get the access token in response for authorization.

2 Answers
answered on Nov 15, 2023 at 7:32am  

Your app does not support username/password auth flow (and RingCentral will stop supporting it as well).

Either implement code flow or generate a JWT token and use with this app. Check this PostMan collections to learn how to authenticate using JWT token.

https://www.postman.com/ringcentral1/workspace/ringcentral-platform-public-test


 0
answered on Nov 14, 2023 at 7:28am  

Based on the error description, the app client id you provided is for the sandbox environment. Then in the header you set the Host server URL to the production server. You should change the host to platform.devtest.ringcentral.com or if you try to authenticate a user under your production account, make sure that your app is graduated to the production and use the app client id/secret for the production environment.

Also, you will need to start using JWT auth flow instead of using username/password.


 0
on Nov 15, 2023 at 2:19am   •  0 likes

Thanks for correcting us with the host details but can you please help us with the new error -

1700043549468.png




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