Set OTP secret
SetManagerOTP¶
Description: Verifies the provided OTP code using the given secret, and if valid, assigns the secret to the manager account to activate two-factor authentication (2FA).
Access Control¶
🛡️ Access Level Required:
SESSION_ADMINorSESSION_MANAGER
Request Parameters¶
| Name | Type | Required | Description |
|---|---|---|---|
| secret | string | Yes | Base32 encoded OTP secret |
| code | string | Yes | Current valid OTP code from authenticator |
Request Example¶
{
"secret": "JBSWY3DPEHPK3PXP",
"code": "123456"
}
Response Example¶
{
"data": "OK"
}
Error Examples¶
Invalid Code¶
{
"error": "INVALID_OTP_CODE"
}
Manager Not Found¶
{
"error": "MANAGER_NOT_FOUND"
}
Internal Error¶
{
"error": "OTP_CANT_SET"
}