Question

Unable to Authorize to the ringcentral using restapi/oauth/token API

  • 14 November 2023
  • 3 replies
  • 99 views

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.


3 replies

Userlevel 1

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.

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

1700043549468.png


Userlevel 1

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

Reply