Prerequisites
- Twilio account
- Twilio phone number
- Account SID and Auth Token
Setup
Get Twilio credentials
- Log in to Twilio Console
- From dashboard, copy:
- Account SID
- Auth Token
- Get or purchase a Twilio phone number
Enter Twilio credentials
- Account SID: Your Twilio Account SID
- Auth Token: Your Twilio Auth Token
- Phone Number: Your Twilio phone number (with country code, e.g., +1234567890)
Configure webhook in Twilio
- Copy the webhook URL from Chatwoot
- In Twilio Console, go to Phone Numbers → Active Numbers
- Select your phone number
- Under Messaging, set:
- A MESSAGE COMES IN: Webhook, HTTP POST
- URL: Paste Chatwoot webhook URL
- Save changes
Features
- Two-way SMS - Send and receive text messages
- MMS support - Send and receive images (if supported by Twilio number)
- Message history - Full conversation threading
- Delivery status - Track message delivery
- Contact management - Automatic contact creation
- Phone number masking - Use Twilio number for privacy
Twilio Phone Numbers
Number Types
Local Numbers- Country-specific phone numbers
- Best for local businesses
- Lower cost
- 1-800, 1-888, etc. (US/Canada)
- Professional appearance
- No charge to sender
- 5-6 digit numbers
- High throughput
- Requires approval and higher cost
Number Capabilities
Ensure your Twilio number has:- ✅ SMS enabled
- ✅ MMS enabled (if you want to send/receive images)
- ✅ Voice enabled (optional, for call integration)
Sending SMS Messages
From Chatwoot UI
- Select the SMS conversation
- Type your message
- Click Send
Via API
MMS (Multimedia Messages)
Sending Images
Attach images to messages in Chatwoot. If your Twilio number supports MMS, images will be sent.Supported Formats
- Images: JPEG, PNG, GIF
- Size limit: 5MB (carrier-dependent)
Not all phone numbers and carriers support MMS. Messages will fail if recipient doesn’t support MMS.
Message Templates
Create canned responses for common SMS scenarios:- Order confirmations
- Appointment reminders
- Delivery notifications
- Support responses
Configuration Options
Twilio phone number with country code (e.g., +1234567890)
Twilio Account SID
Twilio Auth Token (encrypted at rest)
Optional: Twilio Messaging Service SID for advanced features
Best Practices
Keep messages under 160 characters to avoid segmentation
Include opt-out instructions (e.g., “Reply STOP to unsubscribe”)
Respect quiet hours (don’t send messages late at night)
Use canned responses for consistent messaging
Monitor delivery failures and adjust
Comply with SMS regulations (TCPA, GDPR, etc.)
Get consent before sending promotional messages
SMS Regulations & Compliance
United States (TCPA)
- Obtain prior express written consent
- Include opt-out mechanism (e.g., STOP)
- Honor opt-out requests immediately
- Maintain do-not-call list
GDPR (Europe)
- Get explicit consent before sending messages
- Provide clear privacy policy
- Allow users to access and delete their data
- Keep records of consent
General Best Practices
- Don’t send messages to numbers without consent
- Honor opt-out requests (STOP, UNSUBSCRIBE)
- Include your business name in messages
- Provide help keyword (e.g., HELP)
- Keep records of consent and opt-outs
Handling Opt-Outs
Automatically handle STOP keywords:- User sends “STOP” or “UNSUBSCRIBE”
- Create automation rule to:
- Tag conversation as opted-out
- Block future messages to this number
- Send confirmation: “You’ve been unsubscribed”
Troubleshooting
Messages not arriving in Chatwoot
Messages not arriving in Chatwoot
- Verify webhook URL is correct in Twilio
- Check webhook is set to HTTP POST
- Ensure Chatwoot URL is publicly accessible
- Verify firewall allows Twilio webhook IPs
- Check Chatwoot logs for errors
Cannot send messages
Cannot send messages
- Verify Twilio Account SID and Auth Token are correct
- Check Twilio phone number is correct (with country code)
- Ensure phone number has SMS capability
- Verify Twilio account has sufficient balance
- Check recipient number is valid
MMS not working
MMS not working
- Verify Twilio number supports MMS
- Check recipient carrier supports MMS
- Ensure image file size is under 5MB
- Verify image format is supported (JPEG, PNG, GIF)
- Some carriers/countries don’t support MMS
High message costs
High message costs
- Check message length (over 160 chars = multiple segments)
- Use SMS instead of MMS when possible
- Consider Twilio Messaging Services for better rates
- Monitor usage in Twilio Console
- Set up usage alerts
Twilio Pricing
SMS Costs (US)
- Outbound SMS: ~$0.0079 per message
- Inbound SMS: ~$0.0079 per message
- MMS: ~$0.02 per message
Phone Number Costs
- Local number: ~$1/month
- Toll-free number: ~$2/month
- Short code: ~$1,000/month
Pricing varies by country. Check Twilio Pricing for current rates.
Rate Limits
Default Limits
- Long Code: 1 message per second
- Toll-Free: 3 messages per second
- Short Code: 100 messages per second

