Sandbox Environment api not working

  • 1
  • Question
  • Updated 3 years ago
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.

Photo of Yash Pal

Yash Pal

  • 90 Points 75 badge 2x thumb

Posted 3 years ago

  • 1
Photo of Benjamin Dean

Benjamin Dean, Alum

  • 8,662 Points 5k badge 2x thumb
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?
Photo of Yash Pal

Yash Pal

  • 90 Points 75 badge 2x thumb
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.
Photo of Yash Pal

Yash Pal

  • 90 Points 75 badge 2x thumb
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"
Photo of John Wang

John Wang, Official Rep

  • 5,826 Points 5k badge 2x thumb
(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.
Photo of VB

VB, Official Rep

  • 1,510 Points 1k badge 2x thumb
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.