question

webmostdavis avatar image
0 Likes"
webmostdavis asked ·

FetchToken fails with error 21916017

GetSessionID works just fine, but FetchToken fails with error 21916017 "The end user has not completed Auth & Auth sign in flow.". Yes, I have clicked the "I Agree" button to grant application access Any ideas would be thoroughly appreciated TIA
tokens
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.

robda-482 avatar image
0 Likes"
robda-482 answered ·
@sagar_developersupport Don't get me wrong, I do appreciate your help immensely. But it is wrong to assume that I have not experimented with every simple permutation that I could wrack my mind to try. I would not try just once, then give up, and whine here for help. I wouldn't do that to you. Of course I tried 0auth as well as auth & auth. I also tried the sandbox as well as production. And, yes, I did peruse those same docs you recommend. As I said before, those instructions appear to be for a desktop app or a web page where the end user must click on an 'I Agree' button to authorize use of his eBay account. That's NOT what I am attempting to do. I want to make a set of cron jobs which run on our server automagically listing new products, fetching orders, updating quantities, etc. No end user will be involved. I even tried using the MIP, which is simple, fast, and efficient. (The MIP even works in their sandbox!) The only problem with the MIP is that orders can only be fetched at half hour intervals. In half an hour, we could have disastrous over-sells, because we deal in items which sell in a rush, and we sell on multiple channels. But I woke up this morning with a brain cramp, sat back down to work, and tried the auth_token WITHOUT prepending 'Authorization:Bearer ' to the string. It worked. I have no idea at this point where I read the instructions which told me I must paste that bit before the auth_code. I guarantee you I certainly did not invent that prefix myself. Some one or some doc told me that it was necessary. Apparently, it's not. At any rate, for the moment, at least, my AddItem, at least, works. Thanks for your time.
· 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.

sagar_developersupport avatar image
0 Likes"
sagar_developersupport answered ·
Hi @webmostdavis, If you are using eBay's OAuth flow, the user token expires after 2 hours and If you are using eBay's Auth 'n' Auth flow, the user token typically expires after 18 months. Go through following doc, Hope it helps you: https://ebaydts.com/eBayKBDetails?KBid=5075 https://developer.ebay.com/DevZone/guides/features-guide/default.html#Basics/Tokens-MultipleUsers.html%3FTocPath%3DBasics%2520and%2520Concepts%7CMaking%2520an%2520API%2520Call%7CGetting%2520Tokens%7C_____2 Best Regards, eBay Developer Program
· 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.

robda-482 avatar image
0 Likes"
robda-482 answered ·
@ankit_developersupport I appreciate your response and example ... but What the heck is an IAF Token? I sure don't see that anywhere on my developer page. Google tells me IAF stands for "Identity Assertion Framework". I see AppID, ClientID, CertID, DevID... and a place to fetch an 0auth token (which looks a lot like the IAF gobbledegook pasted into your example). But let's change horses here for a moment. Start from the beginning. Let's say, for example, that I want to AddFixedPriceItem via xml. That seems like it should be rather simple to accomplish. Your xml example asks me to paste in my auth token, like so (omitting greater-than and less-than characters, which won't dis[play properly in this forum post): Requester Credentials eBayAuthToken $auth_token /ebayAuthToken /RequesterCredentials So I do. I generate a new auth_token via my developer page & paste it in. When I fire this off I get error 931, meaning that the auth token failed. Now, I do notice that when I generate an auth token via the developer page, it tells me that token will expire very soon. But I just now made the darn thing. So I attempt to mint a new token on the fly by chaining GetSessionID and FetchToken. I was hoping to use this freshly minted token to make this api call work. No dice. That fetch the token on the fly thing appears to be aimed at getting a form which a web site visitor can click to authorize his account on your site... correct? If so, then I am way off track. So... Where & how do I get an auth token which a) works, and b) lasts? I feel as tho if I could just unlock this token business, the whole API process would take off like a big bird and fly. I am just a confused beginner with eBay APIs; but I do have experience with numerous other APIs. Never have used one one so baffling. Thanks a million
· 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.

ankit_developersupport avatar image
0 Likes"
ankit_developersupport answered ·
Hi @webmostdavis, Please add ebay IAF token in your headers (Attached) and add the Ru-Name also. X-EBAY-API-IAF-TOKEN:![alt text][1] ![alt text][1] Feel free to contact us if the issue is remain. Best Regards, eBay Developer Program [1]: /storage/temp/2456-token1.png

token1.png (14.7 KiB)
· 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.