identity APIv2.0.0

getUser

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.

URLs for this method

  • Production URL: https://apiz.ebay.com/commerce/identity/v1/user/
  • Sandbox URL: https://apiz.sandbox.ebay.com/commerce/identity/v1/user/

    In the Sandbox, this method returns mock data.

  • Note: You must use the correct scope or scopes for the data you want returned.

Input

Resource URI (production)

GET https://apiz.ebay.com/commerce/identity/v1/user/

URI parameters

HTTP request headers

All requests made to eBay REST operations require you to provide the Authorization HTTP header for authentication authorization.

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.status.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.


Note: For details on what each scope returns, see the Identity API Overview.

Output

HTTP response headers

Output container/fieldTypeDescription
accountTypeAccountTypeEnumIndicates 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:

EBAY_AT, EBAY_BE, EBAY_CH, EBAY_DE, EBAY_ES, EBAY_FR, EBAY_GB, EBAY_IE, EBAY_IT, EBAY_PL

Valid Values: BUSINESS or INDIVIDUAL

Code so that your app gracefully handles any future changes to this list.

Occurrence: Always

businessAccountBusinessAccountThe container that returns the business account information of the user.

Occurrence: Conditional

businessAccount.addressAddressThe container that returns the address of the business account.

Occurrence: Conditional

businessAccount.address.addressLine1stringThe first line of the street address.

Occurrence: Conditional

businessAccount.address.addressLine2stringThe 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.citystringThe city of the address.

Occurrence: Conditional

businessAccount.address.countryCountryCodeEnumThe two-letter ISO 3166 standard of the country of the address.

Occurrence: Conditional

businessAccount.address.countystringThe county of the address.

Occurrence: Conditional

businessAccount.address.postalCodestringThe postal code of the address.

Occurrence: Conditional

businessAccount.address.stateOrProvincestringThe state or province of the address.

Occurrence: Conditional

businessAccount.doingBusinessAsstringAn additional name that is used for their business on eBay. The business name is returned in the name field.

Occurrence: Conditional

businessAccount.emailstringThe email address of the business account.

Occurrence: Conditional

businessAccount.namestringThe business name associated with the user's eBay account.

Occurrence: Conditional

businessAccount.primaryContactContactThe container that returns the contact details of the person who is the primary contact for this account.

Occurrence: Conditional

businessAccount.primaryContact.firstNamestringThe first name of the contact person.

Occurrence: Conditional

businessAccount.primaryContact.lastNamestringThe last name of the contact person.

Occurrence: Conditional

businessAccount.primaryPhonePhoneThe container that returns the primary phone number for the business account.

Occurrence: Conditional

businessAccount.primaryPhone.countryCodestringThe two-letter ISO 3166 standard of the country to which the phone number belongs.

Occurrence: Conditional

businessAccount.primaryPhone.numberstringThe numeric string representing the phone number.

Occurrence: Conditional

businessAccount.primaryPhone.phoneTypestringThe type of phone service.

Valid Values: MOBILE or LAND_LINE

Code so that your app gracefully handles any future changes to this list.

Occurrence: Conditional

businessAccount.secondaryPhonePhoneThe container that returns the secondary phone number for the business account.

Occurrence: Conditional

businessAccount.secondaryPhone.countryCodestringThe two-letter ISO 3166 standard of the country to which the phone number belongs.

Occurrence: Conditional

businessAccount.secondaryPhone.numberstringThe numeric string representing the phone number.

Occurrence: Conditional

businessAccount.secondaryPhone.phoneTypestringThe type of phone service.

Valid Values: MOBILE or LAND_LINE

Code so that your app gracefully handles any future changes to this list.

Occurrence: Conditional

businessAccount.websitestringThe business website address associated with the eBay account.

Occurrence: Conditional

individualAccountIndividualAccountThe account information of the user.

Occurrence: Conditional

individualAccount.emailstringThe eBay user's registration email address.

Occurrence: Conditional

individualAccount.firstNamestringThe eBay user's first name.

Occurrence: Conditional

individualAccount.lastNamestringThe eBay user's last name.

Occurrence: Conditional

individualAccount.primaryPhonePhoneThe container that returns the eBay user's primary phone number information.

Occurrence: Conditional

individualAccount.primaryPhone.countryCodestringThe two-letter ISO 3166 standard of the country to which the phone number belongs.

Occurrence: Conditional

individualAccount.primaryPhone.numberstringThe numeric string representing the phone number.

Occurrence: Conditional

individualAccount.primaryPhone.phoneTypestringThe type of phone service.

Valid Values: MOBILE or LAND_LINE

Code so that your app gracefully handles any future changes to this list.

Occurrence: Conditional

individualAccount.registrationAddressAddressThe container that returns the eBay user's address information.

Occurrence: Conditional

individualAccount.registrationAddress.addressLine1stringThe first line of the street address.

Occurrence: Conditional

individualAccount.registrationAddress.addressLine2stringThe 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.citystringThe city of the address.

Occurrence: Conditional

individualAccount.registrationAddress.countryCountryCodeEnumThe two-letter ISO 3166 standard of the country of the address.

Occurrence: Conditional

individualAccount.registrationAddress.countystringThe county of the address.

Occurrence: Conditional

individualAccount.registrationAddress.postalCodestringThe postal code of the address.

Occurrence: Conditional

individualAccount.registrationAddress.stateOrProvincestringThe state or province of the address.

Occurrence: Conditional

individualAccount.secondaryPhonePhoneThe container that returns the eBay user's secondary phone number information.

Occurrence: Conditional

individualAccount.secondaryPhone.countryCodestringThe two-letter ISO 3166 standard of the country to which the phone number belongs.

Occurrence: Conditional

individualAccount.secondaryPhone.numberstringThe numeric string representing the phone number.

Occurrence: Conditional

individualAccount.secondaryPhone.phoneTypestringThe type of phone service.

Valid Values: MOBILE or LAND_LINE

Code so that your app gracefully handles any future changes to this list.

Occurrence: Conditional

registrationMarketplaceIdMarketplaceIdEnumThe eBay site on which the account is registered.

Occurrence: Always

statusUserStatusEnumIndicates the user's account status. Possible values: CONFIRMED, UNCONFIRMED, ACCOUNTONHOLD and UNDETERMINED.

Occurrence: Conditional

userIdstringThe eBay immutable user ID of the user's account and can always be used to identify the user.

Occurrence: Always

usernamestringThe user name, which was specific by the user when they created the account.

Note: This value can be changed by the user.

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.

StatusMeaning
200OK
404Not found
500Internal Server Error

Error codes

For more on errors, plus the codes of other common errors, see Handling errors.

CodeDomainCategoryMeaning
140000API_IDENTITYAPPLICATIONThere was a problem with an eBay internal system or process. Contact eBay developer support for assistance.

Warnings

Samples


Note: For response examples for each scope, see the Identity API Overview.

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.
GET
https://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.
GET
https://apiz.ebay.com/commerce/identity/v1/user/

Output

The output is the public profile information for the user and the business information.