Begin MFA enrollment for a login that returned `mfa_enrollment_required`. Pre-session: the user is identified by the `pending_token`, not a session. Returns the TOTP provisioning secret.
POST
End-user session operationId: mfa_enroll_begin/v1/auth/mfa/enroll/begin Authorization
Called from the browser with the publishable application id (x-application-id); the access token lives in memory.
Request body · required
pending_tokenstring required
Responses
200 Enrollment started
{
"data": {
"factor_id": "018f3c4a-7b2e-7c1d-9e0a-1f2b3c4d5e6f",
"otpauth_url": "string",
"secret": "string"
},
"error": {
"code": "string",
"message": "string"
},
"meta": {
"timestamp": "string"
},
"success": false
} 401 Invalid or expired pending token
Request
curl -X POST "http://localhost:8080/v1/auth/mfa/enroll/begin" \
-H "Content-Type: application/json" \
-d '{
"pending_token": "string"
}'Try it
live requestPOST
http://localhost:8080/v1/auth/mfa/enroll/begin