SMS with Twilio
The SMS Channel uses Twilio Messaging: inbound messages and delivery callbacks arrive by webhook, while outbound messages use Twilio's REST API.
What You Need
- Twilio Account SID (
ACfollowed by 32 hexadecimal characters); - an SMS-capable
from_numberin E.164 format; - API Key SID (
SKfollowed by 32 hexadecimal characters); - API Key Secret for outbound REST calls;
- Auth Token for verifying Twilio webhook signatures; and
- a public HTTPS callback URL.
See Twilio Messaging documentation for current phone-number and webhook setup.
Connect in Dashboard
- Open Dashboard → Channel → Add account.
- Choose SMS (Twilio).
- Enter the Account SID, From number, API Key SID, and Status callback URL.
- Add the API Key Secret and Auth Token.
- Choose the DM policy, save, and configure the Twilio number's inbound webhook.
The callback URL must be HTTPS and end with the account route:
https://YOUR_HOST/channels/sms/ACCOUNT_ID/webhook
The default account ID is twilio. Use the same route for inbound messaging and the configured status callback.
Access Policy
SMS supports open, allowlist, or disabled. Sender pairing is not available, so use an allowlist when only known phone numbers should reach Anyy.
Phone numbers should be normalized to E.164 form, such as +14155550123.
Delivery Receipts
Twilio can report delivery progress to the callback URL. A successful Anyy send first proves dispatch to the provider; inspect the later receipt/status before retrying an uncertain message.
Inbound, outbound, carrier, and international messaging charges depend on the Twilio account and destination. Restrict access and test with a known number before enabling automation.
Verify the Connection
anyy channel doctor sms
anyy channel reload
Send one inbound SMS, confirm the sender policy, then test a reply and delivery status.
Troubleshooting
| Problem | Check |
|---|---|
| Twilio rejects callback URL | Exact HTTPS /channels/sms/ACCOUNT_ID/webhook path |
| Webhook signature fails | Auth Token and proxy preservation of the original URL/body |
| Outbound API fails | Account SID, API Key SID/Secret, and From number capability |
| Sender is ignored | DM policy and E.164 allowlist value |
| Status never advances | Status callback URL and Twilio delivery callback configuration |