Skip to main content
This guide walks you through configuring OTP (one-time password) login for your application using the Prelude Session Management API. OTP login sends a verification code via SMS to the user’s phone number.

Prerequisites

Before you start, make sure you have:
  • A Prelude account with access to the Session API
  • An Application ID (appID) — see Applications
  • Your Management API key for backend calls
  • A configured Verify template for sending OTP codes

Set up OTP login (optional)

OTP login works out of the box in development and testing — a default configuration is provided so you can start integrating immediately without any backend setup.
When you’re ready for production, you can customize the OTP delivery to use your own Verify template and sender ID.
1

Create an OTP login configuration

curl -X POST https://api.prelude.dev/v2/session/apps/${APP_ID}/login-configs \
  -H "Authorization: Bearer ${MANAGEMENT_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "config_type": "otp",
    "template_id": "your-verify-template-id",
    "sender_id": "your-sender-id"
  }'
FieldDescription
config_typeMust be "otp".
template_idThe ID of your Verify template. This controls the OTP message content and delivery settings.
sender_idThe sender ID used for SMS delivery.

What’s next?

Now that OTP login is configured on your backend, integrate the frontend using the OTP Login guide.