question

efjamo_0 avatar image
0 Likes"
efjamo_0 asked

How to call Shopping API using OAuth authorization?

As APPID based authorization will be stopped on June 30, 2021, I am now migrating to OAuth authorization. I was able to successfully test my codes to generate OAuth tokens. Now, I'm stuck on how to use generated tokens to get item details equivalent to sample APPID based call below:
http://open.api.ebay.com/shopping?callname=GetSingleItem&version=967&appid=<APPID>&ItemID=<itemID>&responseencoding=XML&IncludeSelector=<define_selector>

oauth usage
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.

clickimusprime avatar image
0 Likes"
clickimusprime answered
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.

sagar_developersupport avatar image
0 Likes"
sagar_developersupport answered

Hi @efjamo_0 ,

For making the Shopping API, you need to authenticate with an OAuth application access token using the X-EBAY-API-IAF-TOKEN HTTP.
See here https://developer.ebay.com/api-docs/static/oauth-client-credentials-grant.html for the The client credentials grant flow topic for more information on generating and managing OAuth application access tokens. Also, please see "Making an API Call" section for Shopping API mentioned below, to know more about making the call.
Ref: https://developer.ebay.com/devzone/shopping/docs/Concepts/ShoppingAPI_FormatOverview.html Application access token expires in 7,200 seconds, meaning this token is valid for two hours from the time it was generated. For continued access after the token expires, you must mint a new token.
Ref: https://developer.ebay.com/api-docs/static/oauth-client-credentials-grant.html Best regards ,
eBay Developer Support

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.