API reference / Accounts
post
/v1/token/mfaComplete the second factor
- Operation
completeMfa- Authentication
- None — public
The password was correct. Kept separate from POST /v1/token so a wrong password and a wrong code are different events in the logs, and so the code can be rate limited far more tightly. A recovery code is accepted in place of a TOTP code and is consumed on use.
Request
Body
mfa_ticketstringrequiredcodestringrequiredResponses
200A session.
access_tokenstringrefresh_tokenstringtoken_typestringone of: Bearer
expires_inintegermfa_requiredbooleanmfa_ticketstringuserobject401The credentials were rejected. A wrong password, an unknown address and an expired ticket return an identical body on purpose: distinguishing them would let a caller discover which accounts exist.
errorobjectrequired429Rate limit exceeded. Retry after `retry-after` seconds.
errorobjectrequiredExample
curl -X POST https://api.haavisa.com/v1/token/mfa \
-H "Content-Type: application/json" \
-d '{
"mfa_ticket": "<mfa_ticket>",
"code": "<code>"
}'More in Accounts
POST/v1/tokenGET/v1/token/introspectPOST/v1/token/revokePOST/v2/accountsGET/v2/accounts/mePATCH/v2/accounts/meGET/v2/accounts/me/messaging-consentPUT/v2/accounts/me/messaging-consentPOST/v2/accounts/mfa/activatePOST/v2/accounts/mfa/disablePOST/v2/accounts/mfa/enrollPOST/v2/accounts/password-resetPOST/v2/accounts/password-reset/confirmPOST/v2/accounts/sign-inPOST/v2/accounts/sign-outPOST/v2/accounts/verify-emailPOST/v2/accounts/verify-email/resend
Something unclear? The eligibility guide explains the model behind the answers; the errors guide covers the envelope.