Twilio
Configure Twilio for SMS and email messaging in Lunogram
Twilio is a cloud communications platform that provides SMS and email (via SendGrid) capabilities for Lunogram.
Setup
- Create a Twilio account if you don't have one
- From the Twilio Console, note your Account SID and Auth Token
Configuration
- Open your Lunogram project settings
- Navigate to Integrations and click Add Integration
- Select Twilio from the list
- Enter your credentials:
| Field | Description |
|---|---|
| Account SID | Your Twilio Account SID (starts with AC) |
| Auth Token | Your Twilio Auth Token |
- Click Save to create the integration
SMS Setup
Purchase a Phone Number
If you don't already have a Twilio phone number:
- In the Twilio Console, go to Phone Numbers > Manage > Buy a Number
- Search for numbers in your desired area
- Ensure the number supports SMS capability
- Purchase the number
Configure SMS Settings
When creating SMS campaigns in Lunogram, you'll specify the From phone number. Use the Twilio phone number you purchased.
For high-volume SMS or toll-free numbers, you may need to complete carrier registration. See Twilio's A2P 10DLC guide.
Inbound Webhooks
To track SMS delivery status and handle opt-outs, configure inbound webhooks:
Delivery Status
- In Twilio Console, go to Phone Numbers > Manage > Active Numbers
- Select your phone number
- Under Messaging Configuration, find A message comes in
- Set the webhook URL to your Lunogram inbound endpoint (found in your integration settings)
- Set the HTTP method to POST
Opt-Out Handling
Twilio automatically handles standard opt-out keywords (STOP, UNSUBSCRIBE, etc.) through Advanced Opt-Out. Lunogram receives these events through the inbound webhook.
Email via SendGrid
Twilio owns SendGrid, and the Twilio provider can send emails through SendGrid's API.
Email support via Twilio SendGrid requires additional setup. For dedicated email functionality, consider using the Resend integration instead.