question

jcz9109 avatar image
0 Likes"
jcz9109 asked ·

Getting tokens via API

Hi, I have implemented some basic API communication using davidtsadler/ebay-sdk So far I've been using manually generated sandbox user OAuth token One thing that's very confusing: how to generate a token to use Fulfilment API via API. All the materials point to a user visiting some page and clicking a button, which seems super weird, I'd expect API will be used almost exclusively programmatically, so no real user. Do we actually need to simulate a user to be able to communicate with API? So like redirectUrlForUser - then load the url via curl, then parse the result and somehow simulate an action on that site to authorize and get the token from result headers? https://github.com/davidtsadler/ebay-sdk-examples/blob/master/oauth-tokens/02-get-user-token.php This code mentions '' - this has to be acquired from redirectUrlForUser? Also which one should it be - there seems to be user and app tokens. For fulfilment API it's user token?
apitokens
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.

jcz9109 avatar image
0 Likes"
jcz9109 answered ·
So Application=Client and User=Authorization scopes, seems I mixed them up
· Share
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.

jcz9109 avatar image
0 Likes"
jcz9109 answered ·
If I try to get Application token I'm getting "The requested scope is invalid, unknown, malformed, or exceeds the scope granted to the client" for https://api.ebay.com/oauth/api_scope/sell.fulfillment but I can see this scope in User Tokens dashboard! Googled out several people asking about this, but none of those 8 results contain any help...
· Share
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.