Herald
OpenapiAuth

Verify TOTP code for two-factor authentication

Completes the login process for users with TOTP enabled. Accepts either a TOTP code from an authenticator app or a backup code. Creates a permanent session on success.

POST
/api/auth/{realmId}/login/verify-totp

Completes the login process for users with TOTP enabled. Accepts either a TOTP code from an authenticator app or a backup code. Creates a permanent session on success.

Path Parameters

realmId*string

Realm ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

agreements?array<>|null
backupCode?string|null
code?string|null
tempToken*string

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/auth/string/login/verify-totp" \  -H "Content-Type: application/json" \  -d '{    "tempToken": "string"  }'
{  "accessToken": "string",  "expiresIn": 0,  "refreshExpiresIn": 0,  "refreshToken": "string",  "tokenType": "string"}
{  "code": "string",  "details": null,  "message": "string",  "requestId": "string",  "status": 0}
{  "code": "string",  "details": null,  "message": "string",  "requestId": "string",  "status": 0}
{  "code": "string",  "details": null,  "message": "string",  "requestId": "string",  "status": 0}