yash-pal1841 avatar image
yash-pal1841 asked John Wang Deactivated commented

Sandbox Environment api not working

Hi All,

We have created one application in sandbox environment but facing an issue during account linking for authorization process. We have also tried with native API as well as CTI demo app but its not working. Please suggest how to process for the same:


  • CTI Demo App issue: Its showing refresh token issue during account linking.
  • Sandbox Native API : Its showing invalid garnt type error.

Thanks for the advance. It would be great if you can share any thought for the same.



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 John Wang Deactivated commented
Are you using Authorization Flow (GET /restapi/oauth/authorize) or Credentials Flow (POST /restapi/oauth/token)?

Are you using one of our SDKs? If you are, which one please?

Could you provide the full request/response (with headers minus API keys) please?
1 |3000

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

yash-pal1841 avatar image yash-pal1841 commented ·
I am using this flow : GET /restapi/oauth/authorize

I want to use CTI demo application so could you please suggest the steps for the same.

0 Likes 0 ·
yash-pal1841 avatar image yash-pal1841 commented ·
After creating the access token m hitting to generate access token as per below:

POST /restapi/oauth/token HTTP/1.1Host:
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
Cache-Control: no-cache
Postman-Token: 53d0830e-4048-f490-d86d-66136ebc5001

Content-Disposition: form-data; name="grant_type"

Content-Disposition: form-data; name="code"

Content-Disposition: form-data; name="redirect_uri"
0 Likes 0 ·
John Wang avatar image John Wang ♦♦ commented ·
(1) Invalid Grant Type Error

The CTI Demo uses 3-legged OAuth with the Authorization Code grant type so your app must have the Authorization Code grant enabled in the Developer Portal for your app (

(2) Redirect URI

The redirect URI for the CTI demo on the GitHub pages account is:

If you are installing the demo from the GitHub repo ( to run / edit locally, you'll need to have your own redirect URI.

For example, if you run the site as http://localhost:8080 then your redirect URI would be:


For CTI demo issues, you can also open issues on the GitHub repo:

For additional resources, see the OAuth 2.0 link provided by VB below.
0 Likes 0 ·
vyshakhbabji avatar image
vyshakhbabji Deactivated answered
Hi Yash ,

I am guessing the application you are building is for web use case. Please follow the instructions in the link . For web use case we would suggest you to use 3 legged Auth flow . There are few sample application demos which will help you resolve the above issue. 
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