Retrieving User Information
To retrieve the data for a particular eBay user, use GetUser. Doing this involves three general steps: setting up the execution environment, specifying the data to return (based on the target user's eBay user ID), and making the API call.
Indicate the user whose data is to be returned by assigning the eBay user ID for that user to the UserID property of the object. Certain private data (such as email addresses) is normally not returned with call responses. See Email Privacy Policy. To indicate this relationship, pass the item ID of the successfully concluded auction in the ItemID property.
GetUser returns a User object that contains the data for the specified user. An application needs to inspect the properties of this object to get individual data values. See the documentation for
UserTypefor a complete list of its properties.
Uniquely Identifying a User
While the value returned in the User.UserId property uniquely identifies an eBay user, this value cannot be relied on 100% of the time. This is because the user may choose to change his or her eBay user name. When this happens, applications can not rely on the User.UserID value to associate the user with such things as item listings and item sales.
To uniquely and consistently identify a user, use the value returned in User.EIASToken. The EIAS value for a given user does not change, even if the user's eBay user name changes. An application stores this value the same way it stores the eBay user name. When making calls that return a User object (which contains both the UserID and EIASToken), the application checks the user ID returned against the one it has stored and changes the stored user ID as necessary. This check is done based on the EIASToken property. For example, if the application stores the data in a database, it would query the database for the EIASToken value to find the right record and compare the eBay user ID values.
Note that the unique user indentifier returned in the EIASToken property has nothing to do the authentication token that you pass in API calls. It also cannot be used as input in places that call for an eBay user ID (such as the UserID input property for GetUser). It does serve as a way to connect user references that have different eBay user names in returned user data. For example, GetItem returns information about the item's current high bidder. Assuming two different item listings where the same user is the high bidder and where that user changed eBay user names between bidding on the two listings, then the value returned in the EIASToken property would allow the application to associate the two with the same buyer and to identify both bidders as the same user.
| http://developer.ebay.com/DevZone/XML/docs/WebHelp/ManagingUserInfo-Retrieving_User_Information.html | |
| © 2004–2013 eBay Inc. All rights reserved. | Version 821 |