GET /oauth/consents
Apps que o usuário autorizou
- Acesso: Pública
- Serviço:
https://auth-api.axuz.net
Autenticação aceita
sessionCookie— Sessão plena Axuz (cookie de sessão da casa). Sessão restrita é 403 enrollment_required.
A descrição desta operação vem do comentário do handler no código (em português).
Parâmetros
Sem parâmetros.
Respostas
200
Lista.
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
items | array<ConsentItem> | sim | |
items[].client_id | string | sim | |
items[].name | string | sim | |
items[].scopes | array<string> | sim | |
items[].granted_at | string<date-time> | sim |
401
Sem sessão válida.
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
error | string | sim | 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 | não |
429
Limite de requisições excedido.
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
error | string | sim |
500
Erro interno. Tente de novo com backoff; reporte o X-Request-Id.
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
error | string | sim |
Exemplos
O "Try it" está desligado nesta referência. Use os exemplos com a sua credencial de teste.
curl
curl -sS -X GET 'https://auth-api.axuz.net/oauth/consents' \
-H "Cookie: access_token=$AXUZ_SESSION_JWT"Node.js
const res = await fetch("https://auth-api.axuz.net/oauth/consents", {
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/consents",
headers={
"Cookie": f"access_token={os.environ['AXUZ_SESSION_JWT']}",
},
timeout=30,
)
res.raise_for_status()
print(res.json())