GET /oauth/userinfo
Claims do usuário (Bearer access token)
- Access: Public
- Service:
https://auth-api.axuz.net
Accepted authentication
bearerAccess
Valida o access token (assinatura, typ, iss, exp, grant vivo), exige o escopo openid e devolve sub (ID interno imutável, NUNCA e-mail) mais name/email/email_verified conforme profile/email.
Userinfo implementa GET/POST /oauth/userinfo.
Parameters
No parameters.
Responses
200
Claims conforme escopo.
| Name | Type | Required | Description |
|---|---|---|---|
sub | string<uuid> | yes | ID interno imutável. Nunca e-mail. |
name | string | no | scope profile |
email | string | no | scope email |
email_verified | boolean | no | scope email |
401
invalid_token (WWW-Authenticate: Bearer error=invalid_token).
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes | invalid_request, invalid_client, invalid_grant, unauthorized_client, unsupported_grant_type, invalid_scope, invalid_token, insufficient_scope, access_denied, login_required, consent_required, enrollment_required, rate_limited, not_found, server_error. |
error_description | string | no |
403
insufficient_scope (sem openid).
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes | invalid_request, invalid_client, invalid_grant, unauthorized_client, unsupported_grant_type, invalid_scope, invalid_token, insufficient_scope, access_denied, login_required, consent_required, enrollment_required, rate_limited, not_found, server_error. |
error_description | string | no |
429
Limite de requisições excedido.
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes |
500
Erro interno. Tente de novo com backoff; reporte o X-Request-Id.
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes |
Examples
"Try it" is turned off in this reference. Use the examples with your test credential.
curl
curl -sS -X GET 'https://auth-api.axuz.net/oauth/userinfo' \
-H "Cookie: access_token=$AXUZ_SESSION_JWT"Node.js
const res = await fetch("https://auth-api.axuz.net/oauth/userinfo", {
method: 'GET',
headers: {
Cookie: `access_token=${process.env.AXUZ_SESSION_JWT}`,
},
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
console.log(await res.json());Python
import os
import requests
res = requests.request(
"GET",
"https://auth-api.axuz.net/oauth/userinfo",
headers={
"Cookie": f"access_token={os.environ['AXUZ_SESSION_JWT']}",
},
timeout=30,
)
res.raise_for_status()
print(res.json())