question

sara avatar image
sara asked ·

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!
topic-default
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.

Tyler Liu avatar image
Tyler Liu answered ·
Try to specify "Token Name"  as "access_token"
Share
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.

sara avatar image
sara answered ·


Still same error.
Share
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.

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?
Share
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.

sara avatar image
sara answered ·


select OAuth 2.0 from the dropdown and it will display 'NEW ACCESS TOKEN'
Share
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.

sara avatar image
sara answered ·
*and it will display 'GET NEW ACCESS TOKEN' button.
Share
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.

Tyler Liu avatar image
Tyler Liu answered ·


Above works like a charm for me.
Share
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.

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
Share
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.

sara avatar image
sara answered ·
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 Share
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.

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 · ·
sara avatar image
sara answered ·
It is working. I tried with another app in RingCentral and it is working now. Thanks for your help.
Share
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.

sara avatar image
sara answered ·
Hey Tyler, is it possible to make the authorize call automatically? or we need to login manually to authorize the request? 
2 comments Share
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.

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 · ·
Check this:  https://medium.com/ringcentral-developers/use-curl-to-access-ringcentral-platform-api-d4710fe68fa4

It's about curl which solves similar problems as postman.
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.