Description

The Twilio integration receives provider webhooks at /api/twilio/[userId], routes inbound text through the WhatsApp-compatible RAG trigger, and sends assistant replies through /api/twilio/reply. Use it when Twilio owns the phone number or WhatsApp sender that customers already use.

Prerequisites

  • Twilio account with an SMS-capable number or approved WhatsApp sender.
  • Account SID, auth token, and sender number.
  • Public HTTPS webhook URL for the Kommander organization.
  • A trained Kommander assistant and tested fallback behavior.

Setup

Representative Twilio setup screen with webhook URL, account SID, auth token, and sender number.
Twilio setup stores account credentials and configures the inbound message webhook.
  1. Open Integrations > Twilio in Kommander and copy the webhook URL.
  2. In Twilio, set the inbound message webhook for the sender to https://YOUR_DOMAIN/api/twilio/YOUR_ORGANIZATION_ID.
  3. Save the Account SID, auth token, and sender number in Kommander.
  4. Send a test SMS or WhatsApp message to the Twilio sender.
  5. Confirm the conversation appears in Kommander and the reply is delivered by Twilio.

Architecture Diagram

Configuration

SettingRequiredNotes
Account SIDYesTwilio account identifier.
Auth tokenYesKeep encrypted and rotate if exposed.
Sender numberYesMust match the configured Twilio sender.
Webhook URLYesUse /api/twilio/[userId] for inbound messages.

Limitations

  • Twilio channel capabilities vary between SMS and WhatsApp senders.
  • Long messages may be split or billed as multiple segments.
  • Media and rich interactions need explicit Twilio handling beyond text replies.

Troubleshooting

  • If Twilio reports a webhook error, inspect the Twilio request log for HTTP status and response body.
  • If replies come from the wrong number, verify the saved sender number.
  • If messages appear but replies fail, rotate the auth token and confirm the Account SID belongs to the sender.
  • If the assistant response is delayed, check RAG trigger and Twilio delivery logs separately.