Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

API

Request

Response

Description

/2fa/token

Code Block
languagejson
{
 "2fa_token": <token received in the 401 mfa_required response>,
 "otp_type": "totp",
 "otp_code": <totp from app>
}
Code Block
{
 "access_token": "<the access token that would be obtain from authentication>"
}

Allows to obtain an access token in exchange from the 2fa_token received from a 401 with error_code=mfa_required and the totp that the user inputs.

The otp_type parameter can be one of [totp, recovery_codes], the value of the otp_code is treated as the generated totp or a recovery code according to the type.

For example, first we send a login request:

...