SMS One-Time Passcode Login
A 2-step recipe with Stytch. We can help you get access.
Recipe · 2 steps
SMS One-Time Passcode Login
with Stytch · Identity & Access Management
Send an SMS OTP and authenticate the code to obtain a session.
- Send a one-time passcode by SMS to the phone number, creating the user if no account exists, and return the phone_id used to authenticate the code.
- Authenticate the one-time passcode using the phone_id as the method_id and the code the user entered to mint a session.
What you'll need to have ready
- phone_number: The E.164 formatted phone number to send the passcode to.
- code: The one-time passcode the user received by SMS and entered.
- session_duration_minutes: Optional session lifetime in minutes for the authenticated session.
For your developer
Arazzo workflow stytch:sms-otp-login, 2 operations: api_otp_v1_otp_sms_LoginOrCreate → api_otp_v1_Authenticate. Specs on APIs.io.