question

Adrian Amaral avatar image
Adrian Amaral asked Adrian Amaral answered

Can't get the basic token

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!



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

vyshakhbabji avatar image
vyshakhbabji Deactivated answered

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]'
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

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

1 |3000

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

Adrian Amaral avatar image
Adrian Amaral answered

Thank you. Separating onto separate lines helped.

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