Autenticación
Crear 2FA
Generar un secreto para autenticación de dos factores (OTP).
POST /auth/create-2fa
Genera un nuevo secreto OTP para configurar la autenticación de dos factores con una app autenticadora (Google Authenticator, Authy, etc.).
Autenticación
Bearer Token en el header Authorization.
Request
curl -X POST https://api.qvapay.com/auth/create-2fa \
-H "Authorization: Bearer {tu-token}"Response
{
"message": "2FA created",
"secret": "JBSWY3DPEHPK3PXP",
"qrcode": "otpauth://totp/QvaPay:[email protected]?secret=JBSWY3DPEHPK3PXP"
}Campos de respuesta
| Campo | Tipo | Descripción |
|---|---|---|
secret | string | Secreto en formato Base32 para configurar manualmente |
qrcode | string | URL otpauth:// para generar código QR |
Errores
| Código | Descripción |
|---|---|
401 | Token inválido o sesión expirada |