Docs › API Reference › MFA Service › POST /mfa/totp/enable
POST /mfa/totp/enable
Enable Time-based One-Time Password (TOTP) authentication for the user, generating a key and QR code, and returning backup recovery codes. Reference: RFC 6238 (TOTP), OWASP ASVS V2.8.3.
Multi-Factor Authentication `bearerAuth` application/json
Request Body
Schema: dto.TOTPEnableRequest
Field Type Required Example Constraints Description
account
string
No
device_name
string
No
Referenced Schemas
dto.TOTPEnableDetailResponse
Field Type Required Example Constraints Description
code
integer
No
data
dto.TOTPEnableResponse
No
message
string
No
timestamp
string
No
dto.TOTPEnableResponse
Field Type Required Example Constraints Description
backup_codes
array ofstring
No
['["12345678"', '"23456789"]']
qr_code
string
No
data:image/png;base64,iVBORw0KGgo...
qr_code_url
string
No
otpauth://totp/AuthMS:user@example.com?secret=JBSWY3DPEHPK3PXP&issuer=AuthMS
secret
string
No
JBSWY3DPEHPK3PXP
setup_url
string
No
https://auth.example.com/mfa/totp/setup
gitee_com_linmes_authms_base_dto.SimpleResponse
Field Type Required Example Constraints Description
code
integer
No
message
string
No
timestamp
string
No