/oauth2/userinfo (GET)
const url = 'https://gymgym.club/api/auth/oauth2/userinfo';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://gymgym.club/api/auth/oauth2/userinfo \ --header 'Authorization: Bearer <token>'Get OpenID Connect user information (UserInfo endpoint)
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”RFC 9449 DPoP proof JWT when using a DPoP-bound access token
Responses
Section titled “Responses”User information retrieved successfully
object
Subject identifier (user ID)
User’s email address, included if ‘email’ scope is granted
User’s full name, included if ‘profile’ scope is granted
User’s profile picture URL, included if ‘profile’ scope is granted
User’s given name, included if ‘profile’ scope is granted
User’s family name, included if ‘profile’ scope is granted
Whether the email is verified, included if ‘email’ scope is granted
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.
object
Examplegenerated
{ "message": "example"}Unauthorized - invalid or missing access token
object
Examplegenerated
{ "error": "example", "error_description": "example"}Forbidden - insufficient scope
object
Examplegenerated
{ "error": "example", "error_description": "example"}Not Found. The requested resource was not found.
object
Examplegenerated
{ "message": "example"}Too Many Requests. You have exceeded the rate limit. Try again later.
object
Examplegenerated
{ "message": "example"}Internal Server Error. This is a problem with the server that you cannot fix.
object
Examplegenerated
{ "message": "example"}