Docs › API Reference › MFA Service › POST /mfa/totp/devices
POST /mfa/totp/devices
Register a new TOTP device for the user, generating an independent key and QR code, supporting multi-device management. Reference: RFC 6238 (TOTP), OWASP ASVS V2.8.3.
Multi-Factor Authentication `bearerAuth` application/json
Request Body
Schema: dto.TOTPDeviceRegisterRequest
Field Type Required Example Constraints Description
device_name
string
Yes
iPhone 15
account
string
No
user@example.com
device_fingerprint
string
No
fp-abc123
Referenced Schemas
dto.TOTPDeviceRegisterDetailResponse
dto.TOTPDeviceRegisterResponse
Field Type Required Example Constraints Description
device_id
string
No
dev-abc123
device_name
string
No
iPhone 15
qr_code
string
No
data:image/png;base64,...
qr_code_url
string
No
otpauth://totp/...
secret
string
No
JBSWY3DPEHPK3PXP
gitee_com_linmes_authms_base_dto.SimpleResponse
Field Type Required Example Constraints Description
code
integer
No
message
string
No
timestamp
string
No