question

sara11893 avatar image
sara11893 asked sara11893 commented

API call to Authorize from Postman

Hi all, I am trying to test the API call to Authorize RingCentral from Postman and I am receiving 'Could not complete oauth login' error. Attached the screen shot of my request.




Access Token URL: https://platform.devtest.ringcentral.com/restapi/oauth/token


Thanks!

rest apiauthentication
1 |3000

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

Tyler Liu avatar image
Tyler Liu answered
Try to specify "Token Name"  as "access_token"
1 |3000

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

sara11893 avatar image
sara11893 answered


Still same error.
1 |3000

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

Tyler Liu avatar image
Tyler Liu answered
I don't use postman very often and I don't even know how to bring up the UI as shown in your screenshot.

Could you please tell me how to reproduce the issue quickly?  Especially how can I bring up the "GET NEW ACCESS TOKEN" dialog?
1 |3000

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

sara11893 avatar image
sara11893 answered


select OAuth 2.0 from the dropdown and it will display 'NEW ACCESS TOKEN'
1 |3000

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

sara11893 avatar image
sara11893 answered
*and it will display 'GET NEW ACCESS TOKEN' button.
1 |3000

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

Tyler Liu avatar image
Tyler Liu answered


Above works like a charm for me.
1 |3000

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

Tyler Liu avatar image
Tyler Liu answered
When you click the "Request Token" button, there will be a modal window. Isn't it the same for you?

By the way, I am using PostMan Version 6.3.0 (6.3.0)  for macOS
1 |3000

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

sara11893 avatar image
sara11893 answered sara11893 commented
I updated Postman and I am using same version. Now i am receiving the following error
{    "error" : "invalid_grant",    "error_description" : "Redirect URIs do not match",    "errors" : [ {      "errorCode" : "OAU-109",      "message" : "Redirect URIs do not match"    } ] 
}

I gave redirect uri as  https://www.getpostman.com/oauth2/callback

Can you tell me what would be the redirect URI? I never worked on OAuth2 API call and I am really confused. 
 
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.

You need to login developer.ringcentral.com and edit your app to set your redirect uri.

The uri used in postman should match the one you set in your RingCentral app.
0 Likes 0 ·
yes, I was making sure the RC uri and request uri are same. But I was getting 'URI does not match error'. 

Everything is working fine now. 

Actually I am trying to make a REST api call from Salesforce to send sms via Ringcentral. I just wanted to test the Authorization part using postman before jumping into Apex. I am able to get the token using Apex.
0 Likes 0 ·
sara11893 avatar image
sara11893 answered
It is working. I tried with another app in RingCentral and it is working now. Thanks for your help.
1 |3000

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

sara11893 avatar image
sara11893 answered Tyler Liu commented
Hey Tyler, is it possible to make the authorize call automatically? or we need to login manually to authorize the request? 
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.

I am afraid that you have to do it manually because you need to enter password to authorize.

But if you do the password flow, it could be automatic
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