POST /auth/mfa/verify-totp-setup
Verify TOTP Setup
Verify TOTP Setup
/auth/mfa/verify-totp-setupRequest body
NestAuthVerifyTotpSetupRequestDto
| Field | Type | Required | Description |
|---|---|---|---|
otp | string | required | The TOTP code from authenticator app Example: 123456 |
secret | string | required | Secret key from TOTP setup Example: JBSWY3DPEHPK3PXP |
Examples
Example
{
"otp": "123456",
"secret": "JBSWY3DPEHPK3PXP"
}Responses
200
NestAuthMfaDeviceVerifiedResponseDto
| Field | Type | Required | Description |
|---|---|---|---|
message | string | required | Response message Example: Device setup successfully |
Example response
{
"message": "Device setup successfully"
}Try it
curl -X POST 'https://api.example.com/auth/mfa/verify-totp-setup' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-d '{"otp":"123456","secret":"JBSWY3DPEHPK3PXP"}'