Generating a REST API token for integrated Chat accounts Follow



  • Avatar
    Hanlin Chen

    I can see if I don't use the code quick enough, I get an invalid_grant error

    However, I always get an access_denied error otherwise... Can anyone suggest which step I could have missed? (I am the admin of both Zendesk chat and support)


  • Avatar
    Niall Colfer

    Hi Hanlin,

    Thanks for letting us know. I see you have an open ticket with my colleague to troubleshoot further, we'll gather some details from you regarding your issue there.

  • Avatar
    Jan Marowski

    Hi Niall,


    I have problem with final step. I'm getting:

    {{"description": "The method is not allowed for the requested URL.", "error": "Method Not Allowed"}}

    Can you tell me if this is some setting that I can set or this is what you have mentioned in beginning of this article in conditions?



  • Avatar
    Ruth Anne Dilig (Edited )


    I understand that this procedure is for authorization code grant type. Can you also provide a tutorial on how I can get an access token with client_credentials grant type? I am using the curl command below which I found in and I am getting an error: "invalid_client". Thanks

    curl \
      -H "Content-Type: application/x-www-form-urlencoded" \
      -d 'grant_type=client_credentials&client_id={your_client_id}&client_secret={your_client_secret}' \
      -X POST
  • Avatar
    Ruth Anne Dilig

    Hello, I already solved this issue. I just wanna share the solution if grant_type is client_credentials. The client_type must be set to confidential to be able to get the access token

  • Avatar
    ★Panayiotis Georgiou


    I have tried to connect to the api and still getting CORS problems

    Failed to load Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '' is therefore not allowed access.

    Can you tell me if this is some setting that I can avoid the CORS problems ?




Please sign in to leave a comment.

Powered by Zendesk