question

zeeshan-yousaf2030 avatar image
zeeshan-yousaf2030 asked Suyash Joshi answered

Authorization Issue

getting started
1 |3000

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

benjamin-dean avatar image
benjamin-dean answered
Making this conversation private since you've shared your API keys and user credentials via the graphic (and we wouldn't want someone to hack your account with this information).

I see you're trying to hit the Production API Endpoint URI: https://platform.ringcentral.com/restapi/oauth/token are your keys being used for that environment or are they for the Sandbox API Endpoint URI: https://platform.devtest.ringcentral.com/restapi/oauth/token ?

Are the user credentials being used associated with the appropriate environment?
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 Phong Vu commented

Before testing the service, following things to be checked:

correct client I'd and secret, username should be phone number and extention number should be correct and allowed permission and correct url based on environment like sandbox/ production

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.

where put clientId and secret

0 Likes 0 ·

This thread is quite old. Please make a new question with your own environment and expectation.

0 Likes 0 ·
kakar avatar image
kakar answered

Hello all,
i am trying to use rest api for devtest password based authorization. but i am get error "Unsupported grant type" with error code "OAU-250" even i have used the correct Content type and my app has password flow selected

screenshot-12.png

screenshot-13.png

screenshot-1.png


screenshot-12.png (71.0 KiB)
screenshot-13.png (71.8 KiB)
screenshot-1.png (61.8 KiB)
1 |3000

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

Suyash Joshi avatar image
Suyash Joshi answered

Hi @kakar thanks for the screenshots, what I don't see in there is the base 64 encoding of your Client ID and Secret before you send the postman auth request. Add this code to do the same inside of "Pre-request Script". Note that you need to have those as environment variables or you can just hard code those values inside of this script.

Give it a shot and let me know the result.


// Populate the Postman environment with:
// RC_SERVER_HOSTNAME, RC_APP_KEY, RC_APP_SECRET,
// RC_USERNAME, RC_EXTENSION, RC_PASSWORD
var appKey = environment["RC_APP_KEY"];
var appSecret = environment["RC_APP_SECRET"];
var apiKey = encodeBasicAuthHeader(appKey, appSecret);

postman.setEnvironmentVariable("basic_auth_header", "Basic ".concat(apiKey));

function encodeBasicAuthHeader(appKey, appSecret) {
    var apiKey = appKey + ':' + appSecret;
    return btoa(apiKey);
}
1 |3000

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

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