Use the Identity API to access the PayPal-supported identity protocols and show OpenID Connect user profile information for standard claims. For more information, see Log In with PayPal.
Shows OpenID Connect user profile information for standard claims. The attributes that are returned depend on the scopes associated with the client ID.
A successful request returns the HTTP 200 OK
status code and a JSON response body that shows OpenID Connect user profile information.
curl -v -X GET https://api-m.sandbox.paypal.com/v1/identity/openidconnect/userinfo?schema=openid \ -H 'Authorization: Bearer <Access-Token>' \ -H 'Content-Type: application/x-www-form-urlencoded'
{- "address": {
- "street_address": "7917394 Annursnac Hill Road Unit 0C",
- "locality": "Ventura",
- "region": "CA",
- "postal_code": "93003",
- "country": "US"
}
}
Message:
Internal server error.
Description: An internal server error occurred. Check the response for error messages.
Message:
Invalid client credentials.
Description: The Authentication
header contains invalid client credentials. Set the correct base64-encoded client_id:secret
in the header.
Message:
Invalid request.
Description: The parameter is not valid. Check for typos and send the correct input parameter.
Message:
Invalid access token.
Description: The bearer token contains an incorrect access token. Send a valid access token as the bearer token.
The preferred address of the user.
street_address | string The full street address. Can include the house number and street name. |
locality | string The city or locality. |
region | string The state, province, prefecture, or region. |
postal_code | string The zip code or postal code. |
country | string The country. |
{- "street_address": "string",
- "locality": "string",
- "region": "string",
- "postal_code": "string",
- "country": "string"
}
The error information.
name required | string The human-readable, unique name of the error. |
debug_id | string The PayPal internal ID. Used for correlation purposes. |
message required | string The message that describes the error. |
information_link required | string The URI to detailed information related to this error for the developer. |
Array of objects (Error Details) An array of additional details for the error. |
{- "name": "string",
- "debug_id": "string",
- "message": "string",
- "information_link": "string",
- "details": [
- {
- "field": "string",
- "issue": "string"
}
]
}
The error details. Required for client-side 4XX
errors.
field required | string The name of the field that caused the error. |
issue required | string The reason for the error. |
{- "field": "string",
- "issue": "string"
}
The OpenID Connect user profile information for standard claims. The details correspond to the scopes of the access token.
user_id | string The user ID of the user. | ||||||||
sub | string The subject ID for the end user at the issuer. | ||||||||
name | string The full name of the user. | ||||||||
given_name | string The given, or first, name of the user. | ||||||||
family_name | string The surname or family name of the user. Also known as the last name. Use also to store multiple surnames including the matronymic, or mother's, surname. | ||||||||
middle_name | string The middle name of the user. Use also to store multiple middle names including the patronymic, or father's, middle name. | ||||||||
picture | string The URL of the profile picture of the user. | ||||||||
string The internationalized email address. | |||||||||
email_verified | boolean Indicates whether the user's email address is verified. | ||||||||
gender | string The user's gender. | ||||||||
birthdate | string <date-time> The user's birthday, in | ||||||||
zoneinfo | string The time zone of the user. | ||||||||
locale | string The locale of the user. | ||||||||
phone_number | string The preferred telephone number of the user. | ||||||||
object (Address) The preferred address of the user. | |||||||||
verified_account | boolean Indicates whether the account is verified. | ||||||||
account_type | string The account type.
| ||||||||
age_range | string The account holder's age range. |
{- "user_id": "string",
- "sub": "string",
- "name": "string",
- "given_name": "string",
- "family_name": "string",
- "middle_name": "string",
- "picture": "string",
- "email": "string",
- "email_verified": true,
- "gender": "string",
- "birthdate": "2019-08-24T14:15:22Z",
- "zoneinfo": "string",
- "locale": "string",
- "phone_number": "string",
- "address": {
- "street_address": "string",
- "locality": "string",
- "region": "string",
- "postal_code": "string",
- "country": "string"
}, - "verified_account": true,
- "account_type": "PERSONAL",
- "age_range": "string"
}