Skip to content
LogoLogo

Enable the time-based one-time password factor

Enable the time-based one-time password factor

POST/api/v1/auth/mfa/totp/confirm

Enables the factor once a code from the enrolling authenticator matches, and returns the account's ten recovery codes. Like the secret, the codes are shown exactly once — only their hashes are stored.

The code used here is spent by the confirmation, so it cannot immediately be replayed as a sign-in.

Calling this without a preceding setup returns 409 mfa_not_set_up; calling it when a factor is already confirmed returns 409 mfa_already_enabled.

Header Parameters

X-CSRF-TokenRequired
string·min 43·max 43

Session-bound CSRF token. It must exactly match the __Host-assign_csrf cookie sent with the request.

Request Body

application/json
codeRequired
string <password>·min 1·max 64

Either a six-digit TOTP code or one of the account's recovery codes. Recovery codes are matched after stripping spaces and hyphens and upper-casing, so a code read off paper matches however it was grouped.

Responses