I can get orders of any users using oauth2 via ebay api. When users authorize our app to connect and get his orders , I add a new record including access key and refresh token to my db . But when this user re-authorize our app , a new record which is identical with the previous one is added. How can I get identifier like storeId in ebay api. Store name can be retrieved via GetStore but it can be changed by shop owner, so I think it can not be identifier
Asked
Active
Viewed 259 times
1 Answers
2
Use empty GetUser call. As mention in Docs: UserID - Specify the user whose data you want returned by the call. If not specified, eBay returns data pertaining to the requesting user (as specified with the eBayAuthToken value).

Dantio
- 1,799
- 1
- 10
- 13
-
Thank you. But there is a note like this in the link you provided Since a bidder's user info is anonymous, this tag contains the actual value of an ID only for that bidder, and for the seller of an item that the user is bidding on. For other users, the actual value is replaced by an anonymous value, according to these rules: When bidding on items, UserID is replaced with the value "a****b" where a and b are random characters from the UserID. For example, if the UserID = IBidALot, it might be displayed as, "I****A". – Mustafa Oct 22 '19 at 08:58
-
When bidding on items listed on the Philippines site: UserID is replaced with the value "Bidder X" where X is a number indicating the order of that user's first bid. For example, if the user was the third bidder, UserID = Bidder 3. Note that in this Philippines site format, the anonymous bidder ID stays the same for a given auction, but is different for different auctions. For example, a bidder who is the third and then the seventh bidder in an auction will be listed for both bids as "Bidder 3". – Mustafa Oct 22 '19 at 09:02
-
I do not know if UserId may change in these cases – Mustafa Oct 22 '19 at 09:04
-
When a user authorize your app, you can get the full information (email and userId) with GetUser call. To use the traditional API you need to pass the IAF token in the header. Look up how to use traditional API with oAuth2. The note you mention is probably when you pass a UserId in the GetUser request (but I'm not sure). – Dantio Oct 22 '19 at 09:28
-
So after a long time , I tried to make a call via traditional api instead of rest api. But It gives 400 bad request error (nO OUTPUT. jUST 400 BAD REQ). How can I get IAF token from user. I am using oauth2 to get orders. Should I use oauth access token when using GetUser method of traditional API? – Mustafa Dec 02 '19 at 13:49
-
Take a look in the documentation: https://developer.ebay.com/api-docs/static/oauth-trad-apis.html – Dantio Dec 11 '19 at 11:28