At a glance
- Availability: Experimental (how to enable).
- Auth: Basic auth.
- Connection: HTTP Basic auth with
TWILIO_ACCOUNT_SIDas the username andTWILIO_AUTH_TOKENas the password. - Docs: https://www.twilio.com/docs/iam/credentials/api
Credentials
Set these per environment. See Connect an integration.Setup
- Create a Twilio Account: Sign up for a free Twilio account at https://www.twilio.com/try-twilio
- Get Your Account SID and Auth Token: Navigate to the Twilio Console Dashboard. Your Account SID and Auth Token are displayed on the main dashboard page. Click the eye icon to reveal your Auth Token.
- Get a Phone Number: Go to Phone Numbers > Manage > Buy a number. Select a phone number with SMS and Voice capabilities. Trial accounts come with one free phone number.
- Set Up WhatsApp (Optional): To send WhatsApp messages, join the Twilio Sandbox for WhatsApp. Go to Messaging > Try it out > Send a WhatsApp message. Follow the instructions to connect your WhatsApp to the sandbox.
- Add Environment Variables: Add your Twilio credentials to your .env file: - TWILIO_ACCOUNT_SID=ACxxxxx - TWILIO_AUTH_TOKEN=your_auth_token - TWILIO_PHONE_NUMBER=+1234567890
- Test the Integration: Try sending a test SMS using the send-sms tool. For trial accounts, you can only send messages to verified phone numbers. Add your phone number at Phone Numbers > Manage > Verified Caller IDs.
- Twilio authenticates with HTTP Basic auth: Account SID as the username and Auth Token as the password
- Trial accounts have limitations: you can only send messages to verified phone numbers
- All trial messages will be prefixed with ‘Sent from your Twilio trial account’
- WhatsApp messages require recipients to first opt-in by messaging your sandbox number
- Phone numbers must be in E.164 format: +[country code][number] (e.g., +14155552671)
- Upgrade your account to remove trial restrictions and enable production features
Tools
| Tool | Access | Description |
|---|---|---|
| Send SMS | Write | Send an SMS text message to a phone number |
| Send WhatsApp Message | Write | Send a WhatsApp message to a phone number |
| List Messages | Read | List recent SMS and WhatsApp messages |
| Get Message | Read | Get details about a specific message |
| List Calls | Read | List recent phone calls |
Example prompts
- Help me send an SMS notification to a customer about their order status.
- Show me the most recent SMS and WhatsApp messages from the last 24 hours.
- Give me a summary of recent calls including duration and status.
- Help me draft and send a WhatsApp message for customer outreach.