Get OAuth user info
Retrieves user information based on the access token passed in the authorization header
GET
/{apiBasePath}/oauth/userinfoAuthorization
AuthorizationBearer token · headerrequiredAn OAuth2 access token returned by the token or authorization endpoints during OAuth flows
Path parameters
apiBasePathstringrequiredIts value depends on the apiBasePath set by the user
Responses
200Retrieved user information
One of:
object
subuserIdrequiredUnique identifier for a user
emailstringThe email of the user
email_verifiedbooleanWhether the email is verified
emailsstring[]phoneNumberstringThe phoneNumber of the user
phoneNumber_verifiedbooleanWhether the phoneNumber is verified
phoneNumbersstring[]rolesstring[]permissionsstring[]generalErrorResponse
statusstringError status code
Allowed:
GENERAL_ERRORmessagestringError message
401The access token is expired, revoked or malformed
messagestring404Resource not found error
string500Internal server error
stringTry it
Server
Authorization
Parameters
Request
curl -X GET "/auth/oauth/userinfo" \
-H "Authorization: Bearer YOUR_TOKEN"const response = await fetch("/auth/oauth/userinfo", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_TOKEN"
}
});import requests
response = requests.get(
"/auth/oauth/userinfo",
headers={
"Authorization": "Bearer YOUR_TOKEN"
},
)Response
{
"sub": "fa7a0841-b533-4478-95533-0fde890c3483",
"email": "[email protected]",
"email_verified": true,
"emails": [
"[email protected]"
],
"phoneNumber": "0036701234567",
"phoneNumber_verified": true,
"phoneNumbers": [
"0036701234567"
],
"roles": [
"admin"
],
"permissions": [
"user:create"
]
}{
"message": "Invalid or expired OAuth2 access token"
}"Not Found""Internal Error"