Implement Email OTP
- Discovery flow
- Organization flow
The Discovery flow is designed for centralized login pages where users authenticate before selecting which Organization to access.
Send the OTP
Send a one-time passcode to the user’s email address:Parameters:
email_address: The user’s email addressdiscovery_expiration_minutes: (Optional) Expiration time in minutes (default: 10)login_template_id: (Optional) Custom email template IDlocale: (Optional) Language for the email (e.g., “en”, “es”)
Authenticate the OTP
After the user receives and enters the code, authenticate it:Parameters:
email_address: The user’s email addresscode: The 6-digit OTP code
The Discovery flow returns an
intermediate_session_token which must be exchanged for a full session after the user selects their organization.