POST /auth/login/totp
(1) decoda {challenge_id, code}; (2) rate limit por IP; (3) gasta 1 tentativa do desafio (atômico, teto 5); (4) confere que a conta TEM T...
- Access: Public
- Service:
https://auth-api.axuz.net
Accepted authentication
No authentication (public route, or protected by link/signature).
(1) decoda {challenge_id, code}; (2) rate limit por IP; (3) gasta 1 tentativa do desafio (atômico, teto 5); (4) confere que a conta TEM TOTP e que o código bate (verifyUserTOTP aceita recovery code); (5) completeMFALogin (uso único + sessão).
loginTOTP conclui o login com um código TOTP (ou recovery code).
Retorno: 200 {id,email,name[,oldest_session_terminated]} + cookies; 400 corpo/challenge_id inválido; 401 challenge_invalid | invalid_code{attempts_remaining}; 429 rate limit; 500 infra.
Parameters
No parameters.
Request body
Corpo JSON. O schema detalhado deste endpoint ainda não está tipado na spec; veja a descrição da operação.
application/json
| Name | Type | Required | Description |
|---|---|---|---|
(corpo) | object | no |
{}Responses
200
{id,email,name[,oldest_session_terminated]} + cookies
400
Corpo/challenge_id inválido
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes |
401
Sem credencial valida
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes |
429
Limite de requisições excedido.
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes |
500
Infra
| 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 POST 'https://auth-api.axuz.net/auth/login/totp' \
-H "Content-Type: application/json" \
-d '{}'Node.js
const res = await fetch("https://auth-api.axuz.net/auth/login/totp", {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({}),
});
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(
"POST",
"https://auth-api.axuz.net/auth/login/totp",
json={},
timeout=30,
)
res.raise_for_status()
print(res.json())