Complete login when user has two-factor authentication enabled.
Call this after POST /api/v1/tokens returns two_factor_required.
Post the challenge token from that response together with the user’s
one-time code (the emailed code, or the current code from their
authenticator app):
{ "challenge_token": "eyJ...", "code": "123456" }
On success the response is 200 with the final access token, in the
same shape as POST /api/v1/tokens:
{ "access_token": "eyJ...", "refresh_token": "...", "token_type": "Bearer", "expires_in": 31536000 }
An incorrect code returns 400 (invalid_grant). A code has at most
five attempts before the challenge locks. An expired challenge returns
410 (challenge_expired) — restart at POST /api/v1/tokens. The
endpoint is rate limited to 10 requests per minute (429).
Body
The challenge token from the login response and the user's one-time code.
Request body for POST /api/v1/tokens/two-factor: the challenge token from the login response plus the user's one-time code. Property names are snake_case to match the wire format of the token endpoints.
The action binds the body as a loose JObject at runtime; this type exists so the API docs describe the body instead of an opaque data parameter (see [OpenApiRequestBody] on the action).
The challenge_token returned by POST /api/v1/tokens when two-factor authentication is required. Echo it back verbatim.
The user's one-time code: the emailed code for an Email challenge, or the current code from their authenticator app for a Totp challenge.