Vor Kurzem aufgerufene Suchen
Keine vor kurzem aufgerufene Suchen
receive "invalid_grant" error when attempting to get access token
Beantwortet
Gepostet 18. Mai 2022
Instructions followed as described here: https://developer.zendesk.com/documentation/live-chat/getting-started/auth/ (which was very difficult to find, by the way!)
Making a POST request to this:
https://www.zopim.com/oauth2/token?grant_type=authorization_code&code=<redacted>&client_id=<redacted>&client_secret=<redacted>&redirect_uri=<redacted>&scope=read
Code is the code as provided to the redirect_uri in the previous step. An API client is active on the account. Response is as follows:
{
"error": "invalid_grant"
}
What am I doing wrong?
0
4
4 Kommentare
Eric Nelson
It looks like you're putting the parameters as query strings when you should be including these in the body of the request. If you adjust the request so that the params are in the body as x-www-form-urlencoded key/value pairs it should function as expected.
Hope this helps,
0
Nicholas Walsh
Your solution didn't work. Same error.
0
Eric Nelson
Can you provide your request so we can take a look?
0
Nicholas Walsh
Hi Eric,
I did eventually fix it. The issue was the redirect_uri was http not https. Error description from the API threw me off!
Thanks,
Nick
0