SMS Integration (Twilio)#
Connect Twilio to Outeract for global SMS messaging with delivery tracking and MMS support.
Overview#
| Property | Value |
|---|---|
| Platform Type | SMS |
| Provider | Twilio |
| Authentication | Account SID + Auth Token |
| Webhook Type | Dedicated |
| Message Limit | 1600 characters (concatenated) |
Prerequisites#
- Twilio account (sign up)
- Twilio phone number
- Account SID and Auth Token
Setup Guide#
Step 1: Get Twilio Credentials#
- Log in to Twilio Console
- On the dashboard, find:
- Account SID (starts with
AC) - Auth Token (click to reveal)
- Account SID (starts with
- Copy both values
Step 2: Get a Phone Number#
- In Twilio Console, go to Phone Numbers → Manage → Buy a number
- Search for a number with SMS capability
- Purchase the number
- Note the phone number (E.164 format:
+14155551234)
Step 3: Create Platform Connection#
mutation {
createPlatformConnection(
platformName: SMS
name: "Twilio SMS"
config: {
account_sid: "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
auth_token: "your-auth-token"
phone_number: "+14155551234"
}
) {
id
webhookUrl
}
}Step 4: Configure Twilio Webhook#
- In Twilio Console, go to Phone Numbers → Manage → Active numbers
- Click your number
- Under Messaging, set:
- A MESSAGE COMES IN: Webhook,
<YOUR_WEBHOOK_URL>, HTTP POST
- A MESSAGE COMES IN: Webhook,
Step 5: Test the Connection#
Send a text message to your Twilio number and verify it appears in Outeract.
Supported Features#
Message Types#
| Type | Send | Receive | Notes |
|---|---|---|---|
| Text | ✓ | ✓ | Up to 1600 chars (concatenated) |
| MMS Images | ✓ | ✓ | Requires MMS-enabled number |
| MMS Video | ✓ | ✓ | Limited support |
Delivery Status#
SMS supports delivery tracking:
queued- Message queued at Twiliosent- Sent to carrierdelivered- Delivered to devicefailed- Delivery failed
Sending Messages#
Basic SMS#
mutation {
sendMessage(
platformConnectionId: "pc_sms_123"
toExternalId: "+14155559999"
message: "Hello from Outeract!"
) {
id
status {
success
externalMessageId
}
}
}MMS with Image#
mutation {
sendMessage(
platformConnectionId: "pc_sms_123"
toExternalId: "+14155559999"
message: "Check out this photo!"
fileIds: ["file_xyz789"]
) {
id
}
}**Note**: MMS requires an MMS-enabled phone number and is only available in US/Canada.
External ID Format#
SMS uses E.164 phone number format:
| Country | Format | Example |
|---|---|---|
| US/Canada | +1XXXXXXXXXX | +14155551234 |
| UK | +44XXXXXXXXXX | +442071234567 |
| Germany | +49XXXXXXXXXXX | +4915112345678 |
Always include the + prefix and country code.
Webhook Events#
Inbound Message#
{
"event_id": "evt_abc123",
"event_type": "message.inbound",
"payload": {
"message": {
"text": "Hello!",
"role": "user"
},
"platform": "sms",
"external_message_id": "SM123..."
},
"edges": {
"sent_by": {
"external_id": "+14155559999"
}
}
}Delivery Status Update#
{
"event_id": "evt_xyz789",
"event_type": "message.status",
"payload": {
"status": "delivered",
"external_message_id": "SM123..."
}
}Message Concatenation#
SMS messages longer than 160 characters are automatically split:
| Message Length | Segments | Characters per Segment |
|---|---|---|
| 1-160 | 1 | 160 |
| 161-306 | 2 | 153 |
| 307-459 | 3 | 153 |
| … | … | 153 |
Twilio handles concatenation automatically but charges per segment.
Rate Limits#
| Type | Limit |
|---|---|
| Long code (regular number) | 1 message/second |
| Toll-free | 3 messages/second |
| Short code | 100 messages/second |
Troubleshooting#
“Invalid phone number”#
- Ensure E.164 format (
+prefix) - Verify country code is correct
- Check if number is a valid mobile number
“Message failed to send”#
- Check Twilio account balance
- Verify Auth Token is current
- Check if number is SMS-enabled
“Not receiving messages”#
- Verify webhook URL is configured in Twilio
- Check webhook URL is publicly accessible
- Ensure webhook is set to POST
“Carrier filtering”#
Some carriers filter messages that appear spammy:
- Avoid URL shorteners
- Use business language
- Register for A2P 10DLC (US)
A2P 10DLC Registration (US)#
For business messaging in the US, register for A2P 10DLC:
- Brand Registration: Register your business with The Campaign Registry
- Campaign Registration: Register your messaging use case
- Number Association: Link your phone numbers to the campaign
This improves deliverability and throughput.
International Messaging#
Twilio supports SMS to 180+ countries. Rates and regulations vary by country.
| Region | Notes |
|---|---|
| US/Canada | MMS supported, A2P registration recommended |
| UK | Sender ID available |
| EU | GDPR compliance required |
| India | DLT registration required |
Security#
Outeract validates Twilio webhooks using request signatures:
- Constructs validation URL from request
- Calculates HMAC-SHA1 signature using Auth Token
- Compares with
X-Twilio-Signatureheader - Rejects invalid requests