Skip to content

/oauth2/userinfo (POST)

POST
/oauth2/userinfo
curl --request POST \
--url https://gymgym.club/api/auth/oauth2/userinfo \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "access_token": "example" }'

Get OpenID Connect user information (UserInfo endpoint)

DPoP
string

RFC 9449 DPoP proof JWT when using a DPoP-bound access token

Media typeapplication/json
object
access_token
string
Examplegenerated
{
"access_token": "example"
}

User information retrieved successfully

Media typeapplication/json
object
sub
required

Subject identifier (user ID)

string
email

User’s email address, included if ‘email’ scope is granted

string format: email
nullable
name

User’s full name, included if ‘profile’ scope is granted

string
nullable
picture

User’s profile picture URL, included if ‘profile’ scope is granted

string format: uri
nullable
given_name

User’s given name, included if ‘profile’ scope is granted

string
nullable
family_name

User’s family name, included if ‘profile’ scope is granted

string
nullable
email_verified

Whether the email is verified, included if ‘email’ scope is granted

boolean
nullable
Examplegenerated
{
"sub": "example",
"email": "hello@example.com",
"name": "example",
"picture": "https://example.com",
"given_name": "example",
"family_name": "example",
"email_verified": true
}

Bad Request. Usually due to missing parameters, or invalid parameters.

Media typeapplication/json
object
message
required
string
Examplegenerated
{
"message": "example"
}

Unauthorized - invalid or missing access token

Media typeapplication/json
object
error
required
string
error_description
string
Examplegenerated
{
"error": "example",
"error_description": "example"
}

Forbidden - insufficient scope

Media typeapplication/json
object
error
required
string
error_description
string
Examplegenerated
{
"error": "example",
"error_description": "example"
}

Not Found. The requested resource was not found.

Media typeapplication/json
object
message
string
Examplegenerated
{
"message": "example"
}

Too Many Requests. You have exceeded the rate limit. Try again later.

Media typeapplication/json
object
message
string
Examplegenerated
{
"message": "example"
}

Internal Server Error. This is a problem with the server that you cannot fix.

Media typeapplication/json
object
message
string
Examplegenerated
{
"message": "example"
}