Chat API tutorial: Generating an OAuth token (integrated Chat accounts)



Edited Nov 11, 2024


8

15

15 comments

Could you please mention how to generate the API GRAPHQL token:
https://chat-api.zopim.com/graphql/request

0


Hi, When i create client_credentials token use the example:
 

  curl https://{subdomain}.zendesk.com/oauth2/chat/token \
  -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
I got {"error": "invalid_client"}. It seems my param is correct!

  

0


1263082275569 You're the best! I tried to follow the documentation and it is chaotic and a huge mess. 

Thanks to your approach I was able to get the token, was trying this for daaaayz!

Unfortunately could only find this in the Forum, maybe it could be linked to in this documentation?

https://developer.zendesk.com/documentation/live-chat/getting-started/auth/#oauth-authentication

Would be a huge help for everyone. Good job on putting this together ♥

0


An access token doesn't expire but it can be revoked.

0


Hello whats the expiration period of the bearer token, please  

Thanks

0


It's worth noting that the request will 400 if you use your full subdomain (company.zendesk.com), in this instance it's looking just for the "company" part of that. If this article could be edited to make that clearer in the beginning (first reference of subdomain) that would have saved me twenty minutes of troubleshooting today :)

0


Why is the query string returned to my callback URL with a hash (#) instead of a question mark? Everything after # in the URL will be ignored by the server, so redirecting to a backend script means the query string cannot be parsed.

0


Hi Chien and Pakpoom, 

If you were able to confirm that all the steps have been properly followed and you keep on receiving an error. I would suggest that you initiate a conversation with us and provide the actual replication steps

0


I also get the same error.

0


I have the same error

My access_token used the "read", "write" and "chat" scopes

0


Sign in to leave a comment.