Skip to main content

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 (AC followed by 32 hexadecimal characters);
  • an SMS-capable from_number in E.164 format;
  • API Key SID (SK followed 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

  1. Open Dashboard → ChannelAdd account.
  2. Choose SMS (Twilio).
  3. Enter the Account SID, From number, API Key SID, and Status callback URL.
  4. Add the API Key Secret and Auth Token.
  5. 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.

SMS can create direct cost

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

ProblemCheck
Twilio rejects callback URLExact HTTPS /channels/sms/ACCOUNT_ID/webhook path
Webhook signature failsAuth Token and proxy preservation of the original URL/body
Outbound API failsAccount SID, API Key SID/Secret, and From number capability
Sender is ignoredDM policy and E.164 allowlist value
Status never advancesStatus callback URL and Twilio delivery callback configuration