Appearance
Identity(1)
?This API is currently not supported by our SDK
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.
operation/userinfo.get Show user profile details
get/v1/identity/openidconnect/userinfo
Try it
Shows OpenID Connect user profile information for standard claims. The attributes that are returned depend on the scopes associated with the client ID.
Request
query Parameters
| schema required | string The schema type. Defines what the API returns in the response. |
Responses
200 A successful request returns the HTTP 200 OK status code and a JSON response body that shows OpenID Connect user profile information.
Request samples
- cURL
- Node.js
- Java
- Python
Copy
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'Response samples
- 200
application/json
Sample 1 - 200 - Show User Profile InformationSample 1 - 200 - Show User Profile Information
Copy
Expand allCollapse all
`{"address": {"street_address": "7917394 Annursnac Hill Road Unit 0C",
"locality": "Ventura",
"region": "CA",
"postal_code": "93003",
"country": "US"
}
}`
tag/Errors Errors
section/INTERNAL_SERVER_ERROR INTERNAL_SERVER_ERROR
Message:
Internal server error.
Description: An internal server error occurred. Check the response for error messages.
section/INVALID_CLIENT INVALID_CLIENT
Message:
Invalid client credentials.
Description: The Authentication header contains invalid client credentials. Set the correct base64-encoded client_id:secret in the header.
section/INVALID_REQUEST INVALID_REQUEST
Message:
Invalid request.
Description: The parameter is not valid. Check for typos and send the correct input parameter.
section/INVALID_TOKEN INVALID_TOKEN
Message:
Invalid access token.
Description: The bearer token contains an incorrect access token. Send a valid access token as the bearer token.
tag/Definitions Definitions
schema/address Address
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. |
Copy
`{"street_address": "string",
"locality": "string",
"region": "string",
"postal_code": "string",
"country": "string"
}`
schema/error Error
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. |
| details | Array of objects (Error Details) An array of additional details for the error. |
Copy
Expand allCollapse all
`{"name": "string",
"debug_id": "string",
"message": "string",
"information_link": "string",
"details": [{"field": "string",
"issue": "string"
}
]
}`
schema/error_details Error Details
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. |
Copy
`{"field": "string",
"issue": "string"
}`
schema/userinfo User Information
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. | | email | 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 YYYY-MM-DD format. See Internet date and time format. The year MAY be 0000, which indicates its omission. To represent only the year, use YYYY format. | | 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. | | address | object (Address)
The preferred address of the user. | | verified_account | boolean
Indicates whether the account is verified. | | account_type | string
The account type.
| Enum Value | Description |
|---|---|
| PERSONAL | Personal account. |
| BUSINESS | Business account. |
| PREMIER | Premier account. |
| age_range | string The account holder's age range. |
Copy
Expand allCollapse all
`{"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"
}`