UserInfo

The UserInfo endpoint returns claims about the authenticated user.

Endpoint

GET /userinfo POST /userinfo

Both methods are supported.

Request

Authorization Header

GET /userinfo HTTP/1.1
Host: auth.example.com
Authorization: Bearer eyJhbGciOiJSUzI1NiIs...

POST with Form Body

POST /userinfo HTTP/1.1
Host: auth.example.com
Content-Type: application/x-www-form-urlencoded

access_token=eyJhbGciOiJSUzI1NiIs...

Response

Claims by Scope

Claims returned depend on requested scopes:

openid (required)

Claim
Type
Description

sub

String

Subject identifier

profile

Claim
Type
Description

name

String

Full name

given_name

String

First name

family_name

String

Last name

middle_name

String

Middle name

nickname

String

Casual name

preferred_username

String

Username

profile

String

Profile page URL

picture

String

Profile picture URL

website

String

Website URL

gender

String

Gender

birthdate

String

Birthday (YYYY-MM-DD)

zoneinfo

String

Timezone

locale

String

Locale

updated_at

Number

Last updated timestamp

email

Claim
Type
Description

email

String

Email address

email_verified

Boolean

Email verified

address

Claim
Type
Description

address

Object

Address object

Address object:

phone

Claim
Type
Description

phone_number

String

Phone number

phone_number_verified

Boolean

Phone verified

Usage

JavaScript

Python

Error Responses

Invalid Token

Expired Token

Insufficient Scope

UserInfo vs ID Token

Aspect
ID Token
UserInfo

Format

JWT (signed)

JSON

When received

Token response

Separate request

Purpose

Authentication proof

Additional claims

Freshness

Issued at auth time

Current values

Use ID token for authentication, UserInfo for current profile data.

Caching

UserInfo responses can be cached briefly:

Next Steps

Last updated

Was this helpful?