03-21-2024 10:38 AM
Hello,
Apologies if this has been asked previously.
I a facing issue with the process of "Exchanging the authorization code for a User access token" as suggested in https://developer.ebay.com/api-docs/static/oauth-auth-code-grant-request.html.
The steps I followed :
https://auth.ebay.com/oauth2/authorize?client_id=<CLIENT_ID>&response_type=code&redirect_uri=<REDIRECT_URI>&locale=en-GB&scope=https%3A%2F%2Fapi.ebay.com%2Foauth%2Fapi_scope%2Fsell.inventory.readonly
curl -X POST 'https://api.ebay.com/identity/v1/oauth2/token' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Authorization: Basic RXNzZW5zZVctY29zdGNvYXUtUFJELTFiOWVh_MORE_CHARS=' \
-d 'grant_type=authorization_code&
code=v%5E1.1%2523i%_MORE_CHARS&
redirect_uri=REDIRECT_URI'
The response of above curl command is :
{"error":"invalid_request","error_description":"request is missing a required parameter or malformed."}
Below are the points that I have checked/verified :
scope=https%3A%2F%2Fapi.ebay.com%2Foauth%2Fapi_scope%2Fsell.inventory.readonly
locale=en-GB
Can someone please suggest me what I am doing wrong here?
Kindly let me know in case of any questions/concerns.
Solved! Go to Best Answer
03-21-2024 12:28 PM
This bothers me (it looks like double encoding)
v%5E1.1%2523i%...
I was expecting this:
v%5E1.1%23i%...
See this post:
03-21-2024 11:57 AM
I created a document when I setup the access tokens, see if it helps.
https://github.com/CMS365-PTY-LTD/EbaySharp?tab=readme-ov-file#access-and-security
03-21-2024 12:28 PM
This bothers me (it looks like double encoding)
v%5E1.1%2523i%...
I was expecting this:
v%5E1.1%23i%...
See this post: