最近搜索


没有最近搜索

receive "invalid_grant" error when attempting to get access token

已回答


已于 2022年5月18日 发布

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 条评论

image avatar

Eric Nelson

Zendesk Developer Advocacy

Hey Nick,
 
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


Your solution didn't work. Same error.

0


image avatar

Eric Nelson

Zendesk Developer Advocacy

Hey Nick,

Can you provide your request so we can take a look?

0


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


请先登录再写评论。

找不到所需的内容?

新建帖子