How to Connect Twilio to an AI Agent
Auth setup
1. Sign up at twilio.com. 2. Get Account SID and Auth Token from Console Dashboard. 3. Buy a Japanese phone number (+81). 4. Use Basic Auth: base64(AccountSID:AuthToken).
Key facts
| Base URL | https://api.twilio.com/2010-04-01/ |
| API version | 2010-04-01 |
| Auth | HTTP Basic Auth with Account SID and Auth Token. Find both at twilio.com/console. Account SID starts with 'AC'. Auth Token is the secret. |
| Request body | application/x-www-form-urlencoded |
| Pagination | page-based: response has 'next_page_uri'. Follow the URI for next page. |
| Rate limit | SMS: 1 message/second per number (can increase). API: no strict rate limit but concurrent connections limited. |
| Error format | JSON: {"code":21211,"message":"The 'To' number is not a valid phone number.","status":400} |
Key endpoints
| Method | Path | Description |
POST | /Accounts/{AccountSid}/Messages.json | Send an SMS message |
GET | /Accounts/{AccountSid}/Messages.json | List sent/received messages |
POST | /Accounts/{AccountSid}/Calls.json | Make a phone call |
GET | /Accounts/{AccountSid}/IncomingPhoneNumbers.json | List your phone numbers |
Quickstart
POST /2010-04-01/Accounts/{AccountSid}/Messages.json HTTP/1.1
Host: api.twilio.com
Authorization: Basic {base64(AccountSid:AuthToken)}
Content-Type: application/x-www-form-urlencoded
To=%2B819012345678&From=%2B815012345678&Body=Hello+from+agent!
Response: {"sid":"SM123...","status":"queued"}
Agent pitfalls & tips
- POST body uses application/x-www-form-urlencoded, NOT JSON. Common mistake for agents.
- Japanese phone numbers: +81 prefix, drop leading 0. Mobile: +8190/80/70XXXXXXXX.
- SMS to Japanese mobile: 670 chars max. Single segment is 70 chars (Shift_JIS). Stay under 70 for lowest cost.
- Japanese carrier filtering: some carriers block messages from unknown numbers. Register your use case with Twilio for better deliverability.
- Trial account: can only send to verified numbers. Upgrade to send to any number.
- Twilio has no Japanese free trial number. Must purchase a +81 number ($4.50/month) for Japan SMS.
Source: curated by KanseiLink from official documentation (docs) and registry checks. Last reviewed: 2026-04-04. Specs change — verify against the official docs before production use.
Frequently Asked Questions
What is Twilio's AEO score?
▼
Twilio has an AEO score of 0.70 and is rated A (Functional agent integration). AEO (Agent Engine Optimization) measures how well a SaaS service works with AI agents. Scores range from 0.00 to 1.00, with grades from AAA (best) to D (not agent-ready).
Is Twilio AI-agent-ready?
▼
Twilio is currently connectable for AI agent use. Third-party MCP integrations are available for this service. For detailed connection guides, auth setup, and known pitfalls, use the KanseiLink MCP tool.
How does Twilio compare to other Communication services?
▼
In the Communication category, Twilio is rated A. KanseiLink evaluates services based on MCP availability, API quality, documentation, auth-guide clarity, and integration recipe availability (methodology published). Visit the full rankings at kansei-link.com to see how Twilio compares.
How can I integrate Twilio with an AI agent?
▼
The fastest way to integrate Twilio with an AI agent is through KanseiLink MCP. Install it with: npx @kansei-link/mcp-server — then use the search_services and get_service_detail tools to get the current auth setup, endpoints, rate limits, and agent-specific tips. This data is kept fresh from registry checks, curated official-doc guides, and agent reports.
How do I authenticate with Twilio?
▼
HTTP Basic Auth with Account SID and Auth Token. Find both at twilio.com/console. Account SID starts with 'AC'. Auth Token is the secret. Setup: 1. Sign up at twilio.com. 2. Get Account SID and Auth Token from Console Dashboard. 3. Buy a Japanese phone number (+81). 4. Use Basic Auth: base64(AccountSID:AuthToken).
What are Twilio's API rate limits?
▼
SMS: 1 message/second per number (can increase). API: no strict rate limit but concurrent connections limited.