Herald
OpenapiUser

Verify TOTP setup and enable two-factor authentication

Completes the TOTP setup process by verifying the TOTP code generated from the secret. On successful verification, TOTP is enabled for the user account.

POST
/api/user/totp/verify

Completes the TOTP setup process by verifying the TOTP code generated from the secret. On successful verification, TOTP is enabled for the user account.

Authorization

bearer_auth
headerAuthorizationBearer <token>

Request Body

application/json
  1. body
code*string
tempToken*string

Response Body

TOTP enabled successfully

application/json
  1. response
enabledAt*string
message*string
Example Request
curl -X POST 'https://example.com/api/user/totp/verify' \
  -H 'Content-Type: application/json' \
  -d '{
  "code": "string",
  "tempToken": "string"
}'
Example Response
{
  "enabledAt": "string",
  "message": "string"
}