question

Andrew Schwartz avatar image
Andrew Schwartz asked ·

OAuth login with RingCentral account

I've been testing various API calls with my dev account and had no problems with the auth flow. I now have started testing making API calls for a RingCentral business account and the sign in step of auth is failing, saying phone number and password don't match. However, I'm able to log into service.ringcentral.com with the same credentials. Does a RingCentral user need to create a dev account to use the API? Why is the login attempt failing?

authorization
1 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

· Write an Answer
Phong Vu avatar image
Phong Vu answered ·

Did you change the app client id and client secret for your production? Also the server must be changed to platform.ringcentral.com/


3 comments
1 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

No, I didn't change client ID and client secret. Do I need to change them? My understanding was that client ID and secret were related to my app, but that others could access the database through my app. Am I confused?

So you're saying that instead of platform.devtest.ringcentral.com, I need to change to platform.ringcentral.com? Are these changes that are required after graduating an app?

0 Likes 0 ·

You wrote "I'm able to log into service.ringcentral.com with the same credentials". This meant that you were logging in with a user's credentials in the production account. To use that user's credentials with your app, you need to graduate the app to production, grab the production app client id and client secret and use the production server. Here is how to set the client id and secret in the sample code

RINGCENTRAL_CLIENT_ID= "Your-Production-ClientId"
RINGCENTRAL_CLIENT_SECRET= "Your-Production-ClientSecret"
RINGCENTRAL_SERVER_URL= "https://platform.ringcentral.com"

rcsdk = SDK(RINGCENTRAL_CLIENT_ID, RINGCENTRAL_CLIENT_SECRET, RINGCENTRAL_SERVER_URL)


1 Like 1 ·

Thank you so much for the detailed answer, that's exactly what I needed to know.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.