POST ./auth/tfa_options

It is used to activate an option for two factor authentication.

Parameter tfaOptType can have the following value:

  • 1 = SMS
  • 3 = TOTP

When the parameter tfaOptType is SMS the field chID it will become mandatory and it should have challenge id. Challenge ID can be taken from POST ./auth/challenge_phone

When the parameter tfaOptType is TOTP the field chSecret it will become mandatory and it should have totpSecret. totpSecret can be taken from GET ./auth/totp.

POST parameter

NameValue TypeValidationDetails
uaIDintrequiredUser ID.
tfaOptTypeintrequired2fa type; Values[1,3]; 1 = SMS, 3 = TOTP
chIDintrequiredChallenge ID. It is mandatory when activating 2fa SMS.
chSecretstringrequiredSecret key can be taken from GET ./auth/totp. It is mandatory when activating 2fa TOTP.
chResponseintrequiredIt will contain the code received via SMS when tfaOptType = 1 or the code generated by the authenticator when tfaOptType = 2

Validation

Error FieldError CodeError Message
tfaOptType101Invalid type or type already activated.
chID102Challenge failed.
chSecret103Challenge failed.

Output example

{
"result": true,
"tfaOptID": 4746
}