question

myretrostore-uk avatar image
0 Likes"
myretrostore-uk asked

Curl example for using oauth and Shopping API

Previously I was using curl to grab details of the items I am selling by using:


http://open.api.ebay.com/shopping?version=897&callname=GetSingleItem&appid='<my app id>'&siteid=3&responseencoding=JSON&IncludeSelector=Details&ItemID='<item ID>'


I now have to start using oauth and after reading all the links I'm still confused how to do this.


I've got a script to generate the oauth token and I believe I have to use pass this in a header X-EBAY-API-IAF-TOKEN


I've tried curl -H 'X-EBAY-API-IAF-TOKEN: <token>' <Above URL>

but keep getting "Application ID invalid" so this can't be right.


Is there someone who can provide a easy to follow curl example to do this. All the eBay links I've read don't seem to help.


Some links point to https://developer.ebay.com/api-docs/static/oauth-client-credentials-grant.html

which say:


Set the following HTTP request headers:

  • Content-Type – Must be set to: application/x-www-form-urlencoded
  • Authorization – The word "Basic " followed by your Base64-encoded OAuth credentials (<client_id>:<client_secret>).




oauthshopping api
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

·
myretrostore-uk avatar image
0 Likes"
myretrostore-uk answered

Thank you. That was easy :)

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.