News & Announcements User Community Developer Community

Welcome to the RingCentral Community

Please note the community is currently under maintenance and is read-only.

Search
Make sure to review our Terms of Use and Community Guidelines.
  Please note the community is currently under maintenance and is read-only.
Home » Developers
Can't get the basic token
Tags: get token
Dec 15, 2021 at 4:06pm   •   3 replies  •  0 likes
Adrian Amaral

I created an App in the sandbox, with permissions for SMS and Read-Only. Password-Flow enabled (and private). Client ID is lXbnBnjyQcywt2tt0NFfVA if you want to check.

I plan on accessing it via a FileMaker app API call, but am unable to get the basic credential token, even using Postman. Screenshots from Postman attached...


If I put the grant_type in the body, I get this error:

{ "errorCode" : "CMN-001" , "message" : "Unable to parse URI query" ,
"errors" : [ { "errorCode" : "CMN-001" , "message" : "Unable to parse URI query" } ] }



screen-shot-2021-12-15-at-50443-pm.png

If I put the grant_type in the header, I get this error:

"error" : "invalid_request" ,
"errors" : [ { "errorCode" : "OAU-250" , "message" : "Unsupported grant type" } ],
"error_description" : "Unsupported grant type" }


screen-shot-2021-12-15-at-50058-pm.png

Any advice would be appreciated...


Thanks!



3 Answers
answered on Dec 17, 2021 at 11:16am  

Thank you. Separating onto separate lines helped.


 1
answered on Dec 16, 2021 at 10:49am  

Grant type, username and password must be in the body. Not sure why you got such an error.

Can you download the code of this project and try in your local machine. Check the authentication implementation code.

Node JS

Python

PHP


 0
answered on Dec 16, 2021 at 1:08pm  

Please test this sample curl code snippet for authentication :

curl --location --request POST 'https://platform.[devtest].ringcentral.com/restapi/oauth/token'
\--header 'Authorization: Basic [base 64 encoded clientID:clientsecret]'
\--header 'Accept: application/json'
\--header 'Content-Type: application/x-www-form-urlencoded;charset=UTF-8'
\--data-urlencode 'grant_type=password'
\--data-urlencode 'username= [main phone number]'
\--data-urlencode 'password= [password]'
\--data-urlencode 'extension=[extension-number]'

 0



A new Community is coming to RingCentral!

Posts are currently read-only as we transition into our new platform.

We thank you for your patience
during this downtime.

Try Workflow Builder

Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!

Try RingCentral Workflow Builder

PRODUCTS
RingEX
Message
Video
Phone
OPEN ECOSYSTEM
Developer Platform
APIs
Integrated Apps
App Gallery
Developer support
Games and rewards

RESOURCES
Resource center
Blog
Product Releases
Accessibility
QUICK LINKS
App Download
RingCentral App login
Admin Portal Login
Contact Sales
© 1999-2024 RingCentral, Inc. All rights reserved. Legal Privacy Notice Site Map Contact Us