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
-
Navigate to Tenant Settings → Message Providers.
-
In the Phone tab, select Twilio as the provider.
-
Enter the required Twilio configuration:
Field Description Twilio SID Your Twilio Account SID from the Twilio console. Twilio Auth Token The corresponding Auth Token. For security, keep this token protected. From The sender phone number, short code, or messaging service registered with Twilio. Format must follow E.164 standard (e.g., +16175551212
).Verification Message The SMS body content sent to users. Use [[OTP]]
as the placeholder for the one-time passcode.OTP Length Length of the OTP (e.g., 6 digits). OTP Expiration Duration (in seconds or minutes) the OTP remains valid. -
Click Save to apply your configuration.
Test Your Configuration
Use the built-in Send test message option:
- Scroll to the Send test message section
- Enter a recipient phone number in E.164 format
- 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)