Get user information using access token

Contents

Get user details using the access_token received after the user completes the authentication.

Endpoint URL: {service.auth0.url} received in EndpointFetching

Request Syntax


GET /userinfo



Request Headers

Parameter Description Required
Authorization Authorization token in the form "Bearer {token}"

Value of type: string
true


200 Response

OK

Response Payload

Parameter Description Required
email The user's email address.

Value of type: string
false
email_verified Indicates if the user's email address has been verified.

Value of type: boolean
false
name The user's full name.

Value of type: string
false
nickname The user's username.

Value of type: string
false
picture The URL of the user's picture. If unavailable, Auth0 uses the Gravatar image associated with the user's email address.

Value of type: string
false
sub The value in 'sub' is the user-id. User-id is the user's unique identifier.

Value of type: string
true
updated_at The timestamp of when the user's profile was last updated/modified.

Value of type: string

Format: dateTime
false


Example

Sample request to get user details by providing access token.

Request


GET /userinfo HTTP/1.1
Host: Endpoint-URL
Authorization: Bearer 

Response


HTTP/1.1 200 OK
  
{
  "sub": "auth0|582641749a46021f65565df0",
  "email": "developer@mycloud.com",
  "name": "My Cloud Developer",
  "nickname": "developer",
  "picture": "https://s.gravatar.com/avatar/1f66371ef418799384ac404049ccf8dd?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fyo.png",
  "updated_at": "2017-02-02T18:50:53.414Z"
}

Have question about this section?