question

paddisaap avatar image
0 Likes"
paddisaap asked

Ebaysdk Python Shopping API invalid token

When i execute the following command:

from ebaysdk.shopping import Connection as Shopping
try:    
    api = Shopping(config_file='ebay.yaml') 
    response = api.execute('FindPopularItems', {'QueryKeywords': 'Python'})

it prints out:

Error, Code: 1.32, Invalid token.Invalid token. Please specify a valid token as HTTP header.

With the finding api it works great.

I use the Python Ebaysdk: https://github.com/timotheus/ebaysdk-python

Where and how do i have to make changes in my scripts?

apipythonshopping-apishopping apiebaysdk-pythonebaysdktoken invalidinvalid tokenapi-pythonfindpopularitems-shopping
10 |600

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

1 Answer

·
jitendra_developersupport avatar image
0 Likes"
jitendra_developersupport answered

Hi @paddisaap,


Developers using Shopping API calls must authenticate with an OAuth application access token in the HTTP header X-EBAY-API-IAF-TOKEN and use OAuth application access tokens with a scope that includes https://api.ebay.com/oauth/api_scope.

Please see the client credentials grant flow topic for more information on generating and managing OAuth application access tokens.


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.