Skip to Content
Docs are being rebuilt — start at Introduction → How it works.

Twilio

Use Twilio to connect an agent to phone calls (Twilio Voice) and WhatsApp (Twilio WhatsApp). Both are connected per agent in the Channels tab of the agent builder and share the same Twilio account credentials.

Prerequisites

  • A saved agent (the Channels tab is locked until the agent is saved).
  • A Twilio account — your Account SID and Auth Token from the Twilio Console .
  • For Voice: a voice-enabled Twilio phone number.
  • For WhatsApp: a Twilio WhatsApp sender (or the Twilio Sandbox for testing).

Twilio Voice

The agent answers and places phone calls. Twilio handles speech-to-text and text-to-speech (Amazon Polly voices); your agent drives the conversation via TwiML.

Fields

FieldNotesRequired
Account SIDTwilio Console → Account InfoYes
Auth TokenTwilio Console dashboardYes
Phone NumberYour Twilio number in E.164 formatNo
VoiceAn Amazon Polly voice for responsesNo (defaults provided)
Greeting MessageSpoken when a call is answeredNo

How to connect

  1. Enter Twilio credentials
    In the agent’s Channels tab, open Twilio Voice → Configure and enter the Account SID and Auth Token. Pick a voice and greeting.
  2. Point your number at TeamMate
    In Twilio Console → Phone Numbers → Active Numbers, open your number and set “A call comes in” to Webhook (HTTP POST), pasting TeamMate’s Voice Webhook URL.
  3. Save in Twilio
    Save the number configuration.
  4. Test the call
    Use Call Me in the Testing step, or call the Twilio number directly.

Voice webhook URL: https://tmmate.ai/api/webhook/twilio/voice/<agentId> (status callback: .../status).

Twilio WhatsApp

The agent sends and receives WhatsApp messages through Twilio.

Fields

FieldNotesRequired
Account SIDTwilio Console → Account InfoYes
Auth TokenTwilio Console dashboardYes
WhatsApp Phone NumberYour WhatsApp-enabled number in E.164 formatYes
Messaging Service SIDTwilio Console → Messaging → ServicesNo

How to connect

  1. Enter Twilio credentials
    In the agent’s Channels tab, open Twilio WhatsApp → Configure and enter the Account SID, Auth Token, and WhatsApp number.
  2. Set the webhook in Twilio
    In Twilio Console → Messaging → Services → your service → Integration, paste TeamMate’s webhook URL for incoming messages (HTTP POST) and save.
  3. Test it
    Use the Testing step to message your number. For the Twilio Sandbox, opt in by sending join <keyword> to the sandbox number first.

WhatsApp webhook URL: https://tmmate.ai/api/webhook/twilio/whatsapp/<agentId> (status callback: https://tmmate.ai/api/webhook/twilio/status/<agentId>).

Limits

  • Twilio WhatsApp supports media up to 16 MB.
  • Sandbox messages only reach numbers that have opted in with the join keyword.

Troubleshooting

  • Test call/message fails. Re-check the Account SID and Auth Token, and that the number is voice- or WhatsApp-enabled.
  • No inbound calls. Confirm the number’s “A call comes in” webhook points at the Voice Webhook URL with HTTP POST.