Twilio Integration
Twilio is a global cloud communications platform. It is the default SMS provider used by most Spaaza chains for OTP phone number verification.
Contents
About Twilio
Twilio is a cloud communications platform that provides programmable SMS, voice, and messaging APIs. Spaaza uses the Twilio Programmable Messaging API to send OTP verification codes to users.
Useful resources:
Webhook Configuration
Webhook config type: twilio
To configure Twilio as the SMS provider for a chain, create a webhook configuration with type set to twilio and event_name set to phone_number_verification. See Configuring an SMS Provider for the general setup steps.
Credentials
Twilio credentials can be configured at two levels:
- Per-chain credentials — set via the webhook configuration for the chain. When using per-chain credentials, all three of the following must be provided:
username— Twilio Account SIDpassword— Twilio Auth Tokensend_from— Twilio Messaging Service SID
- Default Spaaza credentials — if no per-chain credentials are configured, Spaaza's own Twilio account credentials are used automatically.
If any of the three per-chain credential fields is set, all three must be set; otherwise the SMS will not be sent.
Phone Number Format
Twilio accepts phone numbers in E.164 format (e.g. +31612345678). This is the standard format used by Spaaza for storing phone numbers.