cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

request is missing a required parameter or malformed

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 :

  1. Getting user content (as in https://developer.ebay.com/api-docs/static/oauth-consent-request.html ) : I invoked the API
    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
    and received the authorization code via the response that looks like :
  2. Getting user token by providing authorization code :
    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 :

  1. The scope provided is URL encoded
    scope=https%3A%2F%2Fapi.ebay.com%2Foauth%2Fapi_scope%2Fsell.inventory.readonly
  2. My store is listed in UK, so I have used
    locale=en-GB
  3. The authorization code that I am passing to get Auth Token has been URL Encoded

Can someone please suggest me what I am doing wrong here?
Kindly let me know in case of any questions/concerns.

Message 1 of 3
latest reply
1 BEST ANSWER

Accepted Solutions

Re: request is missing a required parameter or malformed

This bothers me (it looks like double encoding)

v%5E1.1%2523i%...

I was expecting this:

v%5E1.1%23i%...

See this post:

https://community.ebay.com/t5/Token-Messaging-Sandbox-related/Unable-to-retrieve-access-token-using-... 

 

 

ShipScript has been an eBay Community volunteer since 2003, specializing in HTML, CSS, Scripts, Photos, Active Content, Technical Solutions, and online Seller Tools.

View Best Answer in original post

Message 3 of 3
latest reply
2 REPLIES 2

Re: request is missing a required parameter or malformed

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 

C# wrapper for eBay REST API
https://github.com/CMS365-PTY-LTD/EbaySharp
Message 2 of 3
latest reply

Re: request is missing a required parameter or malformed

This bothers me (it looks like double encoding)

v%5E1.1%2523i%...

I was expecting this:

v%5E1.1%23i%...

See this post:

https://community.ebay.com/t5/Token-Messaging-Sandbox-related/Unable-to-retrieve-access-token-using-... 

 

 

ShipScript has been an eBay Community volunteer since 2003, specializing in HTML, CSS, Scripts, Photos, Active Content, Technical Solutions, and online Seller Tools.
Message 3 of 3
latest reply