Confirm New 2FA Method
Confirms a new SMS or TOTP 2FA method by verifying a code, enabling 2FA on the account and returning backup codes on first method addition.
Authorizations
API key must be provided in the Authorization header
Body
Verification code from the new 2FA method being confirmed
"123456"
The tfa_secret returned when the code was sent (SMS) or the TOTP secret from the setup step
"abc123secret"
Type of two-factor authentication method being confirmed; defaults to 'sms' when a phone number is provided.
sms, totp "totp"
Phone number for SMS methods; falls back to account's registered number
"+14155550123"
Optional display name for this method
"Personal Phone"
Response
Returns {success: true, msg: "{METHOD} 2FA method added successfully."} and includes backup_codes: [...] if this is the user's first 2FA method.