question

coa99apb avatar image
0 Likes"
coa99apb asked

GetSellerList Invalid IAF token

I'm trying to retrieve a full list of Seller items for sale using GetSellerList on a sandbox account. I am using PHP on my website to do this.

I have successfully gone through the process of authentication and received an access token via the client_credentials method. I am now trying to to call GetSellerList using this token via the xml method as shown on this page: https://developer.ebay.com/devzone/xml/docs/reference/ebay/GetSellerList.html#Input

However, the api is returning the message "Invalid IAF token", along with "21916984ErrorRequestError1173E1173_CORE_APISELLING_19187371_R1"

It does not offer any advice as to why it is invalid, and I cannot find a troubleshooting section in the docs.

Does anyone know what would cause this? A specific scope required perhaps? Or is GetSellerList the best method to use? All I want to do is retrieve a list of items for sale to display them on my site.

Thanks

getsellerlistaccess tokenauthenticationinvalid token
· 1
10 |600

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

coa99apb avatar image coa99apb commented ·

For the record it turned out I was using wrong IAF token, GetSellerList call requires an access token created with the authorization code grant flow. This is described here: https://developer.ebay.com/api-docs/static/oauth-authorization-code-grant.html
I followed this and it worked. However should be noted that 'normal' ebay accounts don't seem to work on the authorization page for sandbox - you need to set up another sandbox seller account and use that

0 Likes 0 ·
eternalgroup avatar image
0 Likes"
eternalgroup answered

This error is shown when you are using the sandbox credentials with the production domain.

Check what domain are you using.

· 1
10 |600

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

coa99apb avatar image coa99apb commented ·
Thank you I found the solution (in the comments on original post)
0 Likes 0 ·
robpav_7497 avatar image
0 Likes"
robpav_7497 answered

Token expired ?

Try to use xml instead of pass the TokenID on the header

· 1
10 |600

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

coa99apb avatar image coa99apb commented ·

Thank you I found the solution (in the comments on original post)


0 Likes 0 ·
jitendra_developersupport avatar image
0 Likes"
jitendra_developersupport answered

Hi @coa99apb,


To make a Trading API request using the OAuth token, please make sure to follow the steps mentioned below:

  1. Remove the <RequesterCredentials> field and its associated value from the request payload (this field is used to pass your Auth'n'Auth credentials).
  2. Add the X-EBAY-API-IAF-TOKEN HTTP request header to the request and populate its value with a valid User access token.

Ref: https://developer.ebay.com/api-docs/static/oauth-trad-apis.html#OAuth


Best Regards,

eBay Developer Support


10 |600

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.