Twilio 開發者文檔、API 參考、程式碼範例與 SDK 庫的完整本地鏡像。
Complete local mirror of all Twilio developer documentation, API references, code examples, and SDK libraries.
| 來源Source | 頁數Pages | 狀態Status |
|---|---|---|
| llms.txt 精選文檔llms.txt curated docs | 1,399 | 100% |
| Sitemap 額外頁面Sitemap extra pages | 3,014 | 99.9% |
| API 錯誤碼參考API error codes | 2,573 | 100% |
全球撥打、接聽與控制電話。基於 TwiML 的 XML 呼叫控制指令,支援 IVR、錄音、會議與即時媒體串流。
Make, receive, and control phone calls globally. TwiML-based call control with XML verbs for IVR, recording, conferencing, and real-time media streams.
透過 SMS、MMS 和 WhatsApp 商業平台在全球收發訊息,支援範本、媒體和投遞追蹤。
Send and receive text messages globally via SMS, MMS, and WhatsApp Business Platform with templates, media, and delivery tracking.
跨 SMS、WhatsApp、聊天和 Facebook Messenger 的統一多方訊息。單一 API 管理所有渠道。
Unified multi-party messaging across SMS, WhatsApp, chat, and Facebook Messenger. Single API for all channels.
基於 WebRTC 的視頻房間,支援錄影、合成與螢幕分享。提供 Web、iOS 和 Android SDK。
WebRTC-based video rooms with recording, composition, and screen sharing. SDKs for Web, iOS, and Android.
交易型與行銷郵件,含動態範本、分析、投遞工具與 IP 管理。
Transactional and marketing email with templates, analytics, deliverability tools, and IP management.
收集、清理與控制客戶數據。604 個目標連接器,135 個雲端應用來源。
Collect, clean, and control customer data. 604 destination connectors, 135 cloud app sources.
from twilio.rest import Client
client = Client("ACCOUNT_SID", "AUTH_TOKEN")
message = client.messages.create(
body="Hello from Twilio!",
from_="+15551234567",
to="+15559876543"
)
print(message.sid)
<Response>
<Say voice="alice">
Welcome! Press 1 for sales.歡迎!按 1 聯繫銷售。
</Say>
<Gather numDigits="1"
action="/handle-key">
<Play>/audio/menu.mp3</Play>
</Gather>
</Response>
基於 WebSocket 的即時語音轉文字/文字轉語音框架,用於建構 AI 語音代理。處理會話管理、低延遲通訊和中斷偵測。
WebSocket-based real-time STT/TTS for building AI voice agents. Handles session management, low-latency communication, and interruption detection.
LLM 驅動的助理,含知識庫、自訂工具、對話歷史與安全護欄。
LLM-powered assistants with knowledge bases, custom tools, conversation history, and guardrails.
AI 通話分析 — 語言運算子對對話進行分類、摘要和洞察提取。共 24 頁文檔。
AI analysis of calls — Language Operators classify, summarize, and extract insights from conversations. 24 pages.
AI 驅動的即時建議、自動結案摘要與客戶檔案充實,為客服人員提供智慧輔助。
AI-powered real-time suggestions, auto-generated wrap-up notes, and customer profile enrichment for agents.
// WebSocket handler for ConversationRelay
wss.on('connection', (ws) => {
ws.on('message', async (data) => {
const msg = JSON.parse(data);
if (msg.type === 'prompt') {
const res = await openai.chat.completions.create({
model: 'gpt-4o',
messages: [{ role: 'user', content: msg.voicePrompt }]
});
ws.send(JSON.stringify({
type: 'text',
token: res.choices[0].message.content
}));
}
});
});
無伺服器 Node.js 執行環境。無需管理伺服器即可部署程式碼。含靜態檔案託管。
Serverless Node.js execution. Deploy code without servers. Includes Assets for static hosting.
拖放式視覺化工作流建構器,支援 IVR、訊息和 ConversationRelay。26 種組件類型。
Drag-and-drop visual flow builder for IVR, messaging, and ConversationRelay. 26 widget types.
跨所有 Twilio 產品的統一事件管線。接入網路上的每個互動。
Unified event pipeline across all Twilio products. Tap into every interaction on the network.
基於屬性的任務路由引擎。技能、佇列、工作流與活動管理。
Attribute-based task routing engine. Skills, queues, workflows, and activity management.
管理 Twilio 資源的命令列介面。支援外掛、設定檔與自動化。
Command-line interface for managing Twilio resources. Plugins, profiles, and automation.
即時狀態同步。跨裝置的文件、清單、映射和訊息串流。
Real-time state synchronization. Documents, lists, maps, and message streams across devices.
透過 SMS、語音、Email、WhatsApp 和 TOTP 進行電話驗證。內建速率限制與欺詐偵測。
Phone verification via SMS, Voice, Email, WhatsApp, and TOTP. Rate limiting and fraud detection built in.
雙因素驗證與無密碼登入。推播、TOTP、SMS 和語音渠道。
Two-factor authentication and passwordless login. Push, TOTP, SMS, and Voice channels.
電話號碼情報:運營商、類型、來電者姓名、SIM 卡交換偵測。
Phone number intelligence: carrier, type, caller name, SIM swap detection.
地理權限、安全名單 API、防欺詐指南、IRSF 國際電信欺詐防範。
Geographic permissions, Safe List API, anti-fraud guide, IRSF toll-fraud prevention.
graph TB
subgraph CL["Client Layer"]
WEB["Web App"]
MOB["Mobile App"]
SRV["Server"]
end
subgraph API["Twilio APIs"]
REST["REST API"]
SDK["SDKs (7 langs)"]
WH["Webhooks"]
WS["WebSocket"]
end
subgraph COMM["Communications"]
VOICE["Voice"]
MSG["Messaging"]
VID["Video"]
CONV["Conversations"]
SG["SendGrid"]
end
subgraph AIML["AI & Intelligence"]
CR["ConversationRelay"]
ASST["AI Assistants"]
CI["Conv. Intelligence"]
end
subgraph CC["Flex Contact Center"]
FLEX["Flex UI"]
TR["TaskRouter"]
INS["Insights"]
end
subgraph PLAT["Platform"]
FN["Functions"]
STU["Studio"]
EVT["Events"]
SEG["Segment"]
end
subgraph SEC["Security"]
VER["Verify"]
AUTH["Authy"]
LOOK["Lookup"]
end
CL --> API
API --> COMM
API --> AIML
API --> CC
API --> PLAT
API --> SEC
VOICE --> CR
CR --> ASST
ASST --> CI
classDef c1 fill:#a8552e22,stroke:#a8552e,stroke-width:2px
classDef c2 fill:#7a352b22,stroke:#7a352b,stroke-width:2px
classDef c3 fill:#3a5a4022,stroke:#3a5a40,stroke-width:2px
classDef c4 fill:#9c7b3022,stroke:#9c7b30,stroke-width:2px
classDef c5 fill:#4a7c6f22,stroke:#4a7c6f,stroke-width:2px
classDef c6 fill:#5a6e8a22,stroke:#5a6e8a,stroke-width:2px
classDef c7 fill:#6a5c8a22,stroke:#6a5c8a,stroke-width:2px
class WEB,MOB,SRV c1
class REST,SDK,WH,WS c2
class VOICE,MSG,VID,CONV,SG c3
class CR,ASST,CI c4
class FLEX,TR,INS c5
class FN,STU,EVT,SEG c6
class VER,AUTH,LOOK c7
| 語言Language | Repository | Stars | Size | 主要功能Key Features |
|---|---|---|---|---|
| Python | twilio-python | 2,049 | 23MB | REST API、TwiML 生成、異步、型別提示REST API, TwiML gen, async, type hints |
| PHP | twilio-php | 1,632 | 22MB | REST API、TwiML、Composer 套件REST API, TwiML, Composer package |
| Node.js | twilio-node | 1,521 | 17MB | REST API、TwiML、Webhook 驗證REST API, TwiML, webhook validation |
| Ruby | twilio-ruby | 1,377 | 18MB | REST API、TwiML、Rack 中介軟體REST API, TwiML, Rack middleware |
| C#/.NET | twilio-csharp | 710 | 22MB | REST API、TwiML、ASP.NET 輔助工具REST API, TwiML, ASP.NET helpers |
| Java | twilio-java | 522 | 19MB | REST API、TwiML、Maven 套件REST API, TwiML, Maven artifact |
| Go | twilio-go | 366 | 24MB | REST API、由 OpenAPI 自動生成REST API, auto-generated from OpenAPI |
twilio_accounts_v1 twilio_api_v2010 twilio_assistants_v1
twilio_bulkexports_v1 twilio_chat_v1/v2/v3 twilio_content_v1/v2
twilio_conversations twilio_events_v1 twilio_flex_v1/v2
twilio_iam_v1 twilio_insights_v1 twilio_intelligence_v2
twilio_knowledge_v1 twilio_lookups_v1/v2 twilio_marketplace_v1
twilio_messaging_v1/v2/v3 twilio_monitor_v1/v2 twilio_notify_v1
twilio_numbers_v1/v2 twilio_pricing_v1/v2 twilio_proxy_v1
twilio_routes_v2 twilio_serverless_v1 twilio_studio_v1/v2
twilio_supersim_v1 twilio_sync_v1 twilio_taskrouter_v1
twilio_trunking_v1 twilio_trusthub_v1 twilio_verify_v2
twilio_video_v1 twilio_voice_v1 twilio_wireless_v1
| Repository | 說明Description | Stars | Size |
|---|---|---|---|
sample-code | 所有產品的官方程式碼範例Official samples for all products | — | 49MB |
api-snippets | 多語言 API 程式碼片段Multi-language API code snippets | — | 37MB |
function-templates | 無伺服器函式範本Serverless function templates | 401 | 31MB |
call-gpt | GenAI 電話工具組GenAI phone call toolkit | 485 | 580K |
speech-assistant-*-node | OpenAI 即時 API + ConversationRelayOpenAI Realtime + ConversationRelay | 352 | 176K |
speech-assistant-*-python | 同上,Python 版本Same as above, Python | 344 | 176K |
live-translation-openai | Flex 即時語音翻譯Real-time voice translation for Flex | 122 | 1.1MB |
mcp | 所有 Twilio API 作為 MCP 工具All Twilio APIs as MCP tools | 96 | 1.1MB |
paste | Twilio 設計系統(React)Twilio design system (React) | 473 | 235MB |
twilio-oai | 54 個 OpenAPI 規格(JSON + YAML)54 OpenAPI specs (JSON + YAML) | 159 | 20MB |
serverless-toolkit | Functions 開發 CLI 工具CLI for Functions development | 127 | 2.6MB |
ai-assistants-samples | AI 助理快速開始範例AI Assistants quickstart | 28 | 600K |