question

Sierra Gold2 avatar image
Sierra Gold2 asked Anirban commented

Unable to obtain an oAuth token in development. Error states "Invalid resource owner credentials"

So, I have been trying to get the Call Log API set up and am going through the development process. I created an app and ensured that I can login to both login.ringcentral.com and developers.ringcentral.com using the same credentials for both areas. The "Try It" button shows that the app has permissions so I have tried obtaining an oAuth token by sending an API request to https://platform.devtest.ringcentral.com and get an "invalid grant" error with a message of "Invalid resource owner credentials" I have tried sending the request via postman and via the ringcentral gitHub API explorer (https://ringcentral.github.io/api-explorer/#!/Authentication/oauth_token_post) and both return the same error. I am using password as the grant_type and have confirmed that the app I created does support the password flow. The app credentials even show "Active" for the password in the sandbox area. I am using 14243227530 as the user. I have also tried using the email associated with the account but have had no luck. Please let me know what I am doing wrong. Thanks!

oauth
1 |3000

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

Phong Vu avatar image
Phong Vu answered

Answered in this thread.

1 |3000

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

Anirban avatar image
Anirban answered Anirban commented

If you are trying in postman client to obtain Auth token, format will be as below:

POST https://platform.devtest.ringcentral.com/restapi/oauth/token

Body: username=<phone_number>&password=<password>&extension=<extension>&grant_type=password

Headers: Content-Type: application/x-www-form-urlencoded

Authorization: Basic <base 64 of Clienid:ClientSecret>

Client id and secret values you will get from app dashboard

2 comments
1 |3000

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

Phong Vu avatar image Phong Vu ♦♦ commented ·

This is the same developer asking the same question twice.

0 Likes 0 ·
Anirban avatar image Anirban Phong Vu ♦♦ commented ·

okey.. got it

0 Likes 0 ·

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys