Building Your App › Integrations
Twilio Integration
Send SMS messages and phone calls with Twilio
What is Twilio?
Twilio lets you send text messages (SMS), make phone calls, and even send WhatsApp messages from your app. It's the most popular service for adding phone/SMS features.
Perfect for:
- SMS notifications and alerts
- Two-factor authentication (2FA)
- Phone verification
- Order updates
- Appointment reminders
What You'll Need
Twilio Account
Sign up at twilio.com - free trial available!
Phone Number
Get a Twilio phone number
API Keys
Copy your credentials
10 Minutes
Quick setup!
Step 1: Get Your Twilio Credentials
Create Account
- Go to twilio.com/try-twilio
- Sign up for free
- Verify your email and phone
- You get $15 free credit!
Get a Phone Number
- In Twilio Console
- Go to Phone Numbers → Manage → Buy a number
- Select your country
- Check: SMS (and Voice if needed)
- Click Buy (uses your free credit)
- Copy your new phone number
Get Your API Credentials
On the Twilio dashboard, you'll see:
Account SID
Starts with: AC
Example: ACxxxxxxxx
Identifies your account
Auth Token
Random string
Secret! Keep it safe
Click to reveal it
Copy both - you'll need them!
Note
Trial Account Limits: You can only send to verified phone numbers. Upgrade to send to anyone.
Step 2: Tell the Agent What You Want
Describe what you need:
Example 1: SMS Notifications
I need to send SMS notifications to users.
Twilio credentials:
- Account SID: ACxxxxxxxx
- Auth Token: xxxxxxxx
- Phone Number: +1234567890
Features:
- Send order confirmations via SMS
- Send shipping updates
- Send account alerts
Please set this up.
Example 2: Phone Verification (2FA)
I need phone number verification for user signup.
Twilio credentials:
- Account SID: ACxxxxxxxx
- Auth Token: xxxxxxxx
- Phone Number: +1234567890
Flow:
1. User enters their phone number
2. Send 6-digit code via SMS
3. User enters code
4. Verify and activate account
Features:
- Code expires in 5 minutes
- Limit resend attempts
- Show countdown timer
Please build this.
Example 3: Appointment Reminders
Send SMS reminders for appointments.
Twilio credentials:
- Account SID: ACxxxxxxxx
- Auth Token: xxxxxxxx
- Phone Number: +1234567890
Reminders:
- 24 hours before appointment
- 2 hours before appointment
- Include appointment details
Please set this up.
Tip
That's all! The agent will set up SMS sending, verification codes, everything.
Step 3: Test SMS Sending
For Trial Accounts
Verify Your Phone
In Twilio Console → Phone Numbers → Verified Caller IDs
Add your personal phone number
Click Preview
In Emergent, click Preview
Send Test SMS
Try sending an SMS to your verified number
Check Phone
You should receive the text message!
After Upgrade
Once you upgrade (add payment method), you can send to any phone number!
Step 4: Go Live (Upgrade Account)
To send to anyone (not just verified numbers):
Upgrade Account
In Twilio Console → Upgrade
Add Payment
Add credit card
Complete Upgrade
Follow the steps
Start Sending!
Now you can send to any number
Common Questions
</Accordion> ## Something Not Working?SMS Not Sending
Tell the agent:
SMS messages aren't sending. Error:
[paste error message]
Can you check the Twilio setup?
"Unverified Number" Error
Tell the agent:
Getting "unverified number" errors.
I'm on trial account - can you:
1. Add instructions for users to verify their number
2. Or remind me I need to upgrade
Wrong Phone Format
Tell the agent:
Users entering phone numbers wrong.
Can you:
1. Auto-format phone numbers
2. Add country code selector
3. Validate format before sending
Real Examples
Example 1: E-commerce Order Updates
Send SMS for order status updates.
Twilio credentials: [will provide]
Messages to send:
- Order placed confirmation
- Payment received
- Shipped (with tracking)
- Out for delivery
- Delivered
Each SMS should include:
- Customer name
- Order number
- Relevant details
Please build this.
Example 2: Two-Factor Authentication
Add 2FA to user login.
Twilio credentials: [will provide]
Flow:
1. User logs in with password
2. Send 6-digit code via SMS
3. User enters code
4. Grant access if correct
Security:
- Code expires in 5 minutes
- Max 3 attempts
- Rate limiting
Please set this up.
Example 3: Booking Reminders
SMS reminders for bookings.
Twilio credentials: [will provide]
Send reminders:
- When booking is confirmed
- 1 day before
- 1 hour before
Include:
- Booking details
- Date/time
- Location/link
- Cancel/reschedule option
Please build this.
Advanced Features
Once basic SMS works:
Delivery Tracking
Track SMS delivery status:
- Sent
- Delivered
- Failed
- Read (if available)
Show status in admin dashboard.
Two-Way SMS
Users can reply to SMS messages.
Handle their responses in the app.
Scheduled Messages
Schedule SMS to send later:
- Daily reminders at 9 AM
- Birthday messages
- Appointment reminders
Quick Checklist
Before going live:
- Tested SMS on verified number
- Messages arrive within seconds
- Text format looks good
- Links work (if included)
- Phone validation works
- Upgraded account (if sending to all numbers)
- Set spending limits in Twilio
Remember
Free trial includes $15 credit - Good for ~2,000 SMS
Very affordable - Most apps spend under $20/month
Upgrade to reach everyone - Trial only sends to verified numbers
Track delivery - Know if messages were received
Set spending limits - Avoid surprise bills
Info
Stuck? Tell the agent: "I need help with Twilio SMS" and explain what's not working.
