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
| Name | Value Type | Validation | Details |
|---|---|---|---|
| uaID | int | required | User ID. |
| tfaOptType | int | required | 2fa type; Values[1,3]; 1 = SMS, 3 = TOTP |
| chID | int | required | Challenge ID. It is mandatory when activating 2fa SMS. |
| chSecret | string | required | Secret key can be taken from GET ./auth/totp. It is mandatory when activating 2fa TOTP. |
| chResponse | int | required | It will contain the code received via SMS when tfaOptType = 1 or the code generated by the authenticator when tfaOptType = 2 |
Validation
| Error Field | Error Code | Error Message |
|---|---|---|
| tfaOptType | 101 | Invalid type or type already activated. |
| chID | 102 | Challenge failed. |
| chSecret | 103 | Challenge failed. |
Output example
{"result": true,"tfaOptID": 4746}
