Initialize MFA Challenge
GET /mfa/flows/{flow}/challenges/{challenge}
GET
/mfa/flows/{flow}/challenges/{challenge}
Initializes a specific challenge within an MFA flow and returns an updated MFA token. This endpoint is used after obtaining an MFA token from GET /mfa/:flow. The challenge will be initialized (e.g., 6-digit OTP sent via email or phone). Supported challenges: otp_email, otp_phone
Flow:
- Authenticate user via JWT token (required).
- Validate MFA token from X-GOTU-MFA-Token header.
- Verify flow and challenge parameters match the MFA token.
- Initialize the challenge (send OTP).
- Return updated MFA token.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” flow
required
string
MFA Flow Name
challenge
required
string
MFA Challenge Name
Header Parameters
Section titled “Header Parameters ” X-GOTU-MFA-Token
required
string
MFA Token from InitializeMFAFlow
Query Parameters
Section titled “Query Parameters ” email
string
Email address (required for otp_email challenge for unauthenticated flows)
phone
string
Phone number (required for otp_phone challenge for unauthenticated flows)
Responses
Section titled “ Responses ”OK
object
token
string
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...Bad request - invalid flow/challenge
object
error
string
some meaningful error messageUnauthorized - missing or invalid auth token
object
error
string
some meaningful error messageForbidden - invalid MFA token
object
error
string
some meaningful error messageInternal server error
object
error
string
some meaningful error message