Confirm authenticator-app (TOTP) enrollment and complete a forced-2FA login.
Post the enrollment token (from POST /api/v1/tokens), the challenge
token (from .../enroll/totp/begin), and the current code from the
user’s authenticator app:
{ "enrollment_token": "eyJ...", "challenge_token": "eyJ...", "code": "123456" }
On success authenticator-app 2FA is enabled and login completes — the response carries the final access token plus the user’s one-time recovery codes:
{
"confirmed": true,
"recovery_codes": ["abcd-efgh-ijkl", "..."],
"access_token": "eyJ...",
"token_type": "Bearer",
"expires_in": 31536000
}
Show the recovery_codes to the user once — they are not returned
again. An incorrect code returns 400 (invalid_grant); an expired
challenge returns 410 (challenge_expired). Rate limited to 10
requests per minute (429).
Query Parameters
Response
Enrollment confirmed; the access token and recovery codes are returned.
Returned from the mid-login enrollment confirm endpoints (POST /api/v1/tokens/two-factor/enroll/{email|totp}/confirm) once the user has proven control of the new mechanism. Completes a forced-enrollment login: it both finalizes the JWT access token and surfaces the freshly generated recovery codes. The property names are snake_case to match the wire format of the other token endpoints (see TokenPayload).
Always true on a success response; the enrollment is now active.
The user's recovery codes, generated as part of first-time enrollment. These are shown once and never returned again — prompt the user to store them somewhere safe. Each code is single-use at POST /api/v1/tokens/two-factor/recovery.
The JWT access token. Use it as Authorization: bearer {access_token} for subsequent API calls — login is complete.
Always Bearer.
Seconds until the access token expires.