Skip to main content

Configure Custom SMS Provider (Twilio)

SecureAuth supports integration with Twilio for sending SMS messages, including one-time passcodes (OTP) for multi-factor authentication, account alerts, and other user notifications.


Steps to Set Up Twilio as SMS Provider

  1. Navigate to Tenant SettingsMessage Providers.

    See Access Tenant Settings

  2. In the Phone tab, select Twilio as the provider.

    Text Message Provider

  3. Enter the required Twilio configuration:

    FieldDescription
    Twilio SIDYour Twilio Account SID from the Twilio console.
    Twilio Auth TokenThe corresponding Auth Token. For security, keep this token protected.
    FromThe sender phone number, short code, or messaging service registered with Twilio. Format must follow E.164 standard (e.g., +16175551212).
    Verification MessageThe SMS body content sent to users. Use [[OTP]] as the placeholder for the one-time passcode.
    OTP LengthLength of the OTP (e.g., 6 digits).
    OTP ExpirationDuration (in seconds or minutes) the OTP remains valid.
  4. Click Save to apply your configuration.


Test Your Configuration

Use the built-in Send test message option:

  1. Scroll to the Send test message section
  2. Enter a recipient phone number in E.164 format
  3. Click Send
tip

Verify the test message is successfully received and the OTP is properly displayed in the configured message format.


Best Practices

  • Use verified Twilio numbers or messaging services for reliability and compliance
  • Format all phone numbers using the E.164 standard (e.g., +14155552671)
  • Avoid hardcoding OTP values in templates—always use [[OTP]]
  • Configure OTP expiration based on your security policy (commonly 2–5 minutes)