question

marboo_4056 avatar image
0 Likes"
marboo_4056 asked

OAuth Access keys single use access??

Calling GetOrders on the fulfillment API using the OAuth access token works correctly but only once.

Subsequent calls using the same access token even though it is well within it's expiry window always fail with "Invalid Access Token". If I fetch a brand new access token it works again.

Are these access tokens single use and I should be destroying them after each call to the api?

The documentation here: https://developer.ebay.com/api-docs/static/oauth-client-credentials-grant.html suggests I should be reusing them until such time as they expire

oauth2fulfillment orders
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.

1 Answer

· Write an Answer
sagar_developersupport avatar image
0 Likes"
sagar_developersupport answered

Hi @marboo_4056,

You need to use authorization code grant(User Token) for Fulfillment API scopes, As this API uses user token not application token.

Ref:- https://developer.ebay.com/api-docs/static/oauth-authorization-code-grant.html

Ref:- https://developer.ebay.com/api-docs/sell/fulfillment/resources/order/methods/getOrder

Note:- OAuth token is valid for only for 2 hours if you have application which works on OAuth token, We would like to recommend you to use refresh token.

Ref:- https://developer.ebay.com/api-docs/static/oauth-refresh-token-request.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.