Identity API

GET /v1/identity/openidconnect/userinfo
Shows user details.
Note: This API is deprecated. Use v1/oauth2/token/userinfo instead.

Parameters

  • schema

    query_string enum

    required

    Filters the response by a schema value. Valid value is openid.

    Possible values: openid.

SDK samples: Node.js, PHP, Python

Sample Request

curl -v -X GET https://api.sandbox.paypal.com/v1/oauth2/token/userinfo?schema=openid \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer Access-Token"

Response

  • user_id

    string

    The ID of the end user at the issuer.

    Read only.

  • sub

    string

    The subject ID for the end user at the issuer.

    Read only.

  • name

    string

    The end user's full name in displayable form including all name parts. Possibly includes titles and suffixes sorted according to the end user's locale and preferences.

    Read only.

  • given_name

    string

    The given, or first, name or names of the end user.

    Read only.

  • family_name

    string

    The surname, or last name or names, of the end user.

    Read only.

  • middle_name

    string

    The middle name of the end user.

    Read only.

  • picture

    string

    The URL of the end user's profile picture.

    Read only.

  • email

    string

    The end user's preferred e-mail address.

    Read only.

  • email_verified

    boolean

    Indicates whether the end user's email address is verified.

    Read only.

  • gender

    string

    The end user's gender.

    Read only.

  • birthdate

    string

    The end user's birthday, in YYYY-MM-DD format. The year MAY be 0000, which indicates that the year is omitted. To represent only the year, use the YYYY format.

    Read only.

  • zoneinfo

    string

    The end user's time zone.

    Read only.

  • locale

    string

    The end user's locale.

    Read only.

  • phone_number

    string

    The end user's preferred telephone number.

    Read only.

  • address

    object

    The end user's preferred address.

    Read only.

  • verified_account

    boolean

    The verified account status.

    Read only.

  • account_type

    enum

    An enumeration of the account types.

    Read only.

    Possible values: PERSONAL, BUSINESS, PREMIER.

  • age_range

    string

    The account holder's age range.

    Read only.

  • payer_id

    string

    The ID of the account payer.

    Read only.

Sample Response

{
  "address": {
    "street_address": "7917394 Annursnac Hill Road Unit 0C",
    "locality": "Ventura",
    "region": "CA",
    "postal_code": "93003",
    "country": "US"
  }
}

Common object definitions

address

  • street_address

    string

    The full street address. Can include the house number and street name.

    Read only.

  • locality

    string

    The city or locality.

    Read only.

  • region

    string

    The state, province, prefecture, or region.

    Read only.

  • postal_code

    string

    The zip code or postal code.

    Read only.

  • country

    string

    The country.

    Read only.

userinfo

  • user_id

    string

    The ID of the end user at the issuer.

    Read only.

  • sub

    string

    The subject ID for the end user at the issuer.

    Read only.

  • name

    string

    The end user's full name in displayable form including all name parts. Possibly includes titles and suffixes sorted according to the end user's locale and preferences.

    Read only.

  • given_name

    string

    The given, or first, name or names of the end user.

    Read only.

  • family_name

    string

    The surname, or last name or names, of the end user.

    Read only.

  • middle_name

    string

    The middle name of the end user.

    Read only.

  • picture

    string

    The URL of the end user's profile picture.

    Read only.

  • email

    string

    The end user's preferred e-mail address.

    Read only.

  • email_verified

    boolean

    Indicates whether the end user's email address is verified.

    Read only.

  • gender

    string

    The end user's gender.

    Read only.

  • birthdate

    string

    The end user's birthday, in YYYY-MM-DD format. The year MAY be 0000, which indicates that the year is omitted. To represent only the year, use the YYYY format.

    Read only.

  • zoneinfo

    string

    The end user's time zone.

    Read only.

  • locale

    string

    The end user's locale.

    Read only.

  • phone_number

    string

    The end user's preferred telephone number.

    Read only.

  • address

    object

    The end user's preferred address.

    Read only.

  • verified_account

    boolean

    The verified account status.

    Read only.

  • account_type

    enum

    An enumeration of the account types.

    Read only.

    Possible values: PERSONAL, BUSINESS, PREMIER.

  • age_range

    string

    The account holder's age range.

    Read only.

  • payer_id

    string

    The ID of the account payer.

    Read only.

Additional API information

Error messages

In addition to common HTTP status codes that the REST APIs return, the Identity API can return the following errors.

  • INVALID_CLIENT

    Invalid client credentials Invalid credentials provided in authentication header. Set the correct Base64-encoded clientID:clientsecret in the authentication header.

  • INVALID_REQUEST

    Invalid request Incorrect parameter provided. Check for typos and send the correct input parameter.

  • INVALID_REQUEST

    Invalid access token Incorrect access token provided as bearer token. Send a valid access token as bearer token.

  • INTERNAL_SERVER_ERROR

    Internal server error An internal server error has occurred. Check for error messages in the response.

Feedback