curl -X POST https://api.gosentrix.io/api/v1/mfa/enroll \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json"
{
"secret": "JBSWY3DPEHPK3PXP",
"qr_code": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...",
"backup_codes": [
"ABCD-1234-EFGH",
"IJKL-5678-MNOP",
"QRST-9012-UVWX",
"YZAB-3456-CDEF",
"GHIJ-7890-KLMN"
]
}
Authentication API
Enroll MFA
Enroll in multi-factor authentication
POST
/
api
/
v1
/
mfa
/
enroll
curl -X POST https://api.gosentrix.io/api/v1/mfa/enroll \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json"
{
"secret": "JBSWY3DPEHPK3PXP",
"qr_code": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...",
"backup_codes": [
"ABCD-1234-EFGH",
"IJKL-5678-MNOP",
"QRST-9012-UVWX",
"YZAB-3456-CDEF",
"GHIJ-7890-KLMN"
]
}
Enroll in multi-factor authentication (MFA) using TOTP (Time-based One-Time Password).
curl -X POST https://api.gosentrix.io/api/v1/mfa/enroll \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json"
{
"secret": "JBSWY3DPEHPK3PXP",
"qr_code": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...",
"backup_codes": [
"ABCD-1234-EFGH",
"IJKL-5678-MNOP",
"QRST-9012-UVWX",
"YZAB-3456-CDEF",
"GHIJ-7890-KLMN"
]
}
Headers
string
required
Bearer token (access token)
Response
string
TOTP secret key (for manual entry in authenticator apps)
string
QR code data URL (for scanning with authenticator apps)
array
One-time backup codes (save securely)
Next Steps
- Scan the QR code with an authenticator app (Google Authenticator, Authy, etc.)
- Verify MFA setup using MFA Verify
- Save backup codes in a secure location
Errors
object
Invalid or missing token
object
MFA already enrolled