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
  1. body
agreements?array<>|null
backupCode?string|null
code?string|null
tempToken*string

Response Body

TOTP verification successful

application/json
  1. response
accessToken*string
expiresIn*integer
Formatint64
Range0 <= value
refreshExpiresIn*integer
Formatint64
Range0 <= value
refreshToken*string
tokenType*string
Example Request
curl -X POST 'https://example.com/api/auth/string/login/verify-totp' \
  -H 'Content-Type: application/json' \
  -d '{
  "tempToken": "string"
}'
Example Response
{
  "accessToken": "string",
  "expiresIn": 0,
  "refreshExpiresIn": 0,
  "refreshToken": "string",
  "tokenType": "string"
}