Confirmar y activar MFA
POST
/auth/mfa/verify
const url = 'https://api.dev.lade.com.mx/auth/mfa/verify';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"code":"123456"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.dev.lade.com.mx/auth/mfa/verify \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "code": "123456" }'Verifica el código TOTP generado con el secreto de /auth/mfa/setup (Cognito VerifySoftwareToken) y, si es válido, marca SOFTWARE_TOKEN_MFA como el método de MFA preferido del usuario.
Authorizations
Sección titulada «Authorizations»Request Bodyrequired
Sección titulada «Request Bodyrequired»Media typeapplication/json
object
code
required
Código TOTP de 6 dígitos
string
Example
{ "code": "123456"}Responses
Sección titulada «Responses»MFA activado correctamente
Media typeapplication/json
object
message
string
Example
{ "message": "MFA activado correctamente"}Solicitud inválida
Media typeapplication/json
object
error
required
string
message
string
field
string
Example
{ "error": "Validation failed", "field": "email", "message": "Invalid email format"}No autenticado
Media typeapplication/json
object
error
required
string
message
string
field
string
Example
{ "error": "Unauthorized", "message": "Invalid or expired token"}