GET/user/
This method retrieves the account profile information for an authenticated user, which requires a User access token. What is returned is controlled by the scopes.
For a business account you use the default scope commerce.identity.readonly
, which returns all the fields in the businessAccount container. These are returned because this is all public information.
For an individual account, the fields returned in the individualAccount container are based on the scope you use. Using the default scope, only public information, such as eBay user ID, are returned. For details about what each scope returns, see the Identity API Overview.
In the Sandbox, this API returns mock data. Note: You must use the correct scope or scopes for the data you want returned.
Input
Resource URI
This method is supported in Sandbox environment. To access the endpoint, just replace the apiz.ebay.com
root URI with apiz.sandbox.ebay.com
URI parameters
This method has no URI parameters.
HTTP request headers
All requests made to eBay REST operations require you to provide the Authorization
HTTP header for authentication authorization.
All other standard RESTful request headers are optional. For more information on standard RESTful request headers, see the HTTP request headers- opens rest request components page table.
OAuth scope
This request requires an access token created with the authorization code grant flow, using one or more scopes from the following list (please check your Application Keys page for a list of OAuth scopes available to your application):
https://api.ebay.com/oauth/api_scope/commerce.identity.readonly
https://api.ebay.com/oauth/api_scope/commerce.identity.name.readonly
https://api.ebay.com/oauth/api_scope/commerce.identity.address.readonly
https://api.ebay.com/oauth/api_scope/commerce.identity.email.readonly
https://api.ebay.com/oauth/api_scope/commerce.identity.phone.readonly
See OAuth access tokens for more information.
Request payload
This call has no payload.
Request fields
This call has no field definitions.
Output
HTTP response headers
This call has no response headers.
Response payload
Response fields
Output container/field | Type | Description |
---|---|---|
accountType | AccountTypeEnum | Indicates the user account type. This is determined when the user registers with eBay. If they register for a business account, this value will be BUSINESS. If they register for a private account, this value will be INDIVIDUAL. This designation is required by the tax laws in the following countries: Occurrence: Always |
businessAccount | BusinessAccount | The container that returns the business account information of the user. Occurrence: Conditional |
businessAccount.address | Address | The container that returns the address of the business account. Occurrence: Conditional |
businessAccount.address.addressLine1 | string | The first line of the street address. Occurrence: Conditional |
businessAccount.address.addressLine2 | string | The second line of the street address. This field is not always used, but can be used for 'Suite Number' or 'Apt Number'. Occurrence: Conditional |
businessAccount.address.city | string | The city of the address. Occurrence: Conditional |
businessAccount.address.country | CountryCodeEnum | The two-letter ISO 3166 standard of the country of the address. Occurrence: Conditional |
businessAccount.address.county | string | The county of the address. Occurrence: Conditional |
businessAccount.address.postalCode | string | The postal code of the address. Occurrence: Conditional |
businessAccount.address.stateOrProvince | string | The state or province of the address. Occurrence: Conditional |
businessAccount.doingBusinessAs | string | An additional name that is used for their business on eBay. The business name is returned in the name field. Occurrence: Conditional |
businessAccount.email | string | The email address of the business account. Occurrence: Conditional |
businessAccount.name | string | The business name associated with the user's eBay account. Occurrence: Conditional |
businessAccount.primaryContact | Contact | The container that returns the contact details of the person who is the primary contact for this account. Occurrence: Conditional |
businessAccount.primaryContact.firstName | string | The first name of the contact person. Occurrence: Conditional |
businessAccount.primaryContact.lastName | string | The last name of the contact person. Occurrence: Conditional |
businessAccount.primaryPhone | Phone | The container that returns the primary phone number for the business account. Occurrence: Conditional |
businessAccount.primaryPhone.countryCode | string | The two-letter ISO 3166 standard of the country to which the phone number belongs. Occurrence: Conditional |
businessAccount.primaryPhone.number | string | The numeric string representing the phone number. Occurrence: Conditional |
businessAccount.primaryPhone.phoneType | string | The type of phone service. Occurrence: Conditional |
businessAccount.secondaryPhone | Phone | The container that returns the secondary phone number for the business account. Occurrence: Conditional |
businessAccount.secondaryPhone.countryCode | string | The two-letter ISO 3166 standard of the country to which the phone number belongs. Occurrence: Conditional |
businessAccount.secondaryPhone.number | string | The numeric string representing the phone number. Occurrence: Conditional |
businessAccount.secondaryPhone.phoneType | string | The type of phone service. Occurrence: Conditional |
businessAccount.website | string | The business website address associated with the eBay account. Occurrence: Conditional |
individualAccount | IndividualAccount | The account information of the user. Occurrence: Conditional |
individualAccount.email | string | The eBay user's registration email address. Occurrence: Conditional |
individualAccount.firstName | string | The eBay user's first name. Occurrence: Conditional |
individualAccount.lastName | string | The eBay user's last name. Occurrence: Conditional |
individualAccount.primaryPhone | Phone | The container that returns the eBay user's primary phone number information. Occurrence: Conditional |
individualAccount.primaryPhone.countryCode | string | The two-letter ISO 3166 standard of the country to which the phone number belongs. Occurrence: Conditional |
individualAccount.primaryPhone.number | string | The numeric string representing the phone number. Occurrence: Conditional |
individualAccount.primaryPhone.phoneType | string | The type of phone service. Occurrence: Conditional |
individualAccount.registrationAddress | Address | The container that returns the eBay user's address information. Occurrence: Conditional |
individualAccount.registrationAddress.addressLine1 | string | The first line of the street address. Occurrence: Conditional |
individualAccount.registrationAddress.addressLine2 | string | The second line of the street address. This field is not always used, but can be used for 'Suite Number' or 'Apt Number'. Occurrence: Conditional |
individualAccount.registrationAddress.city | string | The city of the address. Occurrence: Conditional |
individualAccount.registrationAddress.country | CountryCodeEnum | The two-letter ISO 3166 standard of the country of the address. Occurrence: Conditional |
individualAccount.registrationAddress.county | string | The county of the address. Occurrence: Conditional |
individualAccount.registrationAddress.postalCode | string | The postal code of the address. Occurrence: Conditional |
individualAccount.registrationAddress.stateOrProvince | string | The state or province of the address. Occurrence: Conditional |
individualAccount.secondaryPhone | Phone | The container that returns the eBay user's secondary phone number information. Occurrence: Conditional |
individualAccount.secondaryPhone.countryCode | string | The two-letter ISO 3166 standard of the country to which the phone number belongs. Occurrence: Conditional |
individualAccount.secondaryPhone.number | string | The numeric string representing the phone number. Occurrence: Conditional |
individualAccount.secondaryPhone.phoneType | string | The type of phone service. Occurrence: Conditional |
registrationMarketplaceId | MarketplaceIdEnum | The eBay site on which the account is registered. Occurrence: Always |
status | UserStatusEnum | Indicates the user's account status. Possible values: Occurrence: Always |
userId | string | The eBay immutable user ID of the user's account and can always be used to identify the user. Occurrence: Always |
username | string | The user name, which was specific by the user when they created the account. Occurrence: Always |
HTTP status codes
This call can return one of the following HTTP status codes. For an overview of the status codes, see HTTP status codes in Using eBay RESTful APIs.
Status | Meaning |
---|---|
200 | OK |
404 | Not found |
500 | Internal Server Error |
Error codes
For more on errors, plus the codes of other common errors, see Handling errors.
Code | Domain | Category | Meaning |
---|---|---|---|
140000 | API_IDENTITY | APPLICATION | There was a problem with an eBay internal system or process. Contact eBay developer support for assistance. |
Warnings
This call has no warnings.
Samples
New to making API calls? Please see Making a Call.
Note: Identifiers, such as order IDs or user IDs, and personal data in these samples might be anonymized or may no longer be active on eBay. If necessary, substitute current, relevant eBay data in your requests.
Sample 1: Retrieve Public Information about an Individual
This sample returns the user's public account profile information.
Input
There are no inputs or request payload. The scope used was commerce.identity.readonly
.
GEThttps://apiz.ebay.com/commerce/identity/v1/user/
Output
The output is the public profile information for the user.
Sample 2: Retrieve Public Information about a Business
This sample returns the user's account profile and business information.
Input
There are no inputs or request payload. The scope used was commerce.identity.readonly
.
GEThttps://apiz.ebay.com/commerce/identity/v1/user/
Output
The output is the public profile information for the user and the business information.