question

barry-love avatar image
0 Likes"
barry-love asked ·

The provided authorization grant code is invalid or was issued to another client

Hi I am trying for the past day to get around it but I can't :( I am a seller on ebay and I am writing my own code to connect to my inventory and manage it. I am stuck on retrieving the user token in order to make a call to Sell API. 1. I logged in to my developer account and used App Id and Client Id (of production) to form a base 64 authorization. 2. I clicked on User Token, and clicked on sign in to production for OAUTH. in the end I got a long token which there is expires above it. 3. I am making the following call: https://api.ebay.com/identity/v1/oauth2/token?redirect_uri=<; RuName >&grant_type=authorization_code&code=< code from above > with header: Content-Type: application/x-www-form-urlencoded Authorization: Basic However I am getting: { "error": "invalid_grant", "error_description": "the provided authorization grant code is invalid or was issued to another client" } What am I doing wrong?
tokenoauth2
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

66hari99 avatar image
1 Like"
66hari99 answered ·
For us, it was happening coz we were encoding the `code` twice. Try decoding the code once before sending to the token endpoint.
· 1 · Share
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Dude, you just saved me a ton of time. Thank you for this post!!!!

0 Likes 0 · ·
michab2003 avatar image
0 Likes"
michab2003 answered ·
fyi... [in this thread][1] you find a lot infos about that issue.... [1]: https://github.com/davidtsadler/ebay-sdk-php/issues/212
· Share
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

adla-3677 avatar image
0 Likes"
adla-3677 answered ·
me too. I can get a token with grant_type `client_credentials`, but not `authorization_code`. I need `User Access Token` not `Application Access Token` only. Anyone who has fixed this issue?
· Share
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

gripgate avatar image
0 Likes"
gripgate answered ·
I have the same issue now. barry-love how did you solve your issue??
· Share
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avishek_developersprogram avatar image
0 Likes"
avishek_developersprogram answered ·
Hi @barry_love, Please let us know if you are still facing any issues. Thank you, avishek_developersprogram
· Share
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

rachana_developer.support avatar image
0 Likes"
rachana_developer.support answered ·
Did you use the required scopes. Here is the documentation: https://developer.ebay.com/api-docs/static/oauth-gen-user-token.html Please check if you followed all the steps
· Share
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.