CONNECT APP
Build with Twilio
Communication
- API key
MCP
Give your agent Twilio tools
Every Twilio action is exposed as an MCP tool on Pipedream's remote server. Point a client at it with your end user's ID and Connect resolves that user's Twilio account for each tool call — you store no tokens.
// accessToken: mint a short-lived token with the Connect SDK — see the MCP guide
const transport = new StreamableHTTPClientTransport(
new URL("https://remote.mcp.pipedream.net/v3"),
{
requestInit: {
headers: {
Authorization: `Bearer ${accessToken}`,
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
"x-pd-app-slug": "twilio",
},
},
},
)
const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)
const { tools } = await mcp.listTools()
// e.g. run Make a Phone Call:
const result = await mcp.callTool({
name: "twilio-make-phone-call",
arguments: {
from: "From",
to: "To",
},
})# access_token: mint a short-lived token with the Connect SDK — see the MCP guide
headers = {
"Authorization": f"Bearer {access_token}",
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", # any stable ID for this user in your system
"x-pd-app-slug": "twilio",
}
async with streamablehttp_client("https://remote.mcp.pipedream.net/v3", headers=headers) as (read, write, _):
async with ClientSession(read, write) as session:
await session.initialize()
tools = await session.list_tools()
# e.g. run Make a Phone Call:
result = await session.call_tool("twilio-make-phone-call", {
"from": "From",
"to": "To",
})API PROXY
Call the Twilio API directly
For an endpoint with no pre-built tool, the Connect proxy forwards your request to the Twilio API with the connected user's credentials attached. You store no tokens and write no refresh logic.
const resp = await pd.proxy.get({
externalUserId: "{external_user_id}", // any stable ID for this user in your system
accountId: "apn_xxxxxxx",
url: "https://api.twilio.com/2010-04-01/Accounts.json",
})
// Any allowed Twilio endpoint works here. Pipedream attaches the
// connected account's credentials to the outgoing request.# The path segment is the target URL, URL-safe base64 encoded:
# https://api.twilio.com/2010-04-01/Accounts.json
curl "https://api.pipedream.com/v1/connect/{project_id}/proxy/aHR0cHM6Ly9hcGkudHdpbGlvLmNvbS8yMDEwLTA0LTAxL0FjY291bnRzLmpzb24?external_user_id={external_user_id}&account_id=apn_xxxxxxx" \
-H "Authorization: Bearer {access_token}" \
-H "x-pd-environment: production"SDK
Run Twilio actions from your backend
Connect a user's Twilio account once, then run Make a Phone Call on their behalf from your own code — TypeScript, Python, or plain HTTP.
import { PipedreamClient } from "@pipedream/sdk"
const pd = new PipedreamClient({
projectId: process.env.PIPEDREAM_PROJECT_ID!,
clientId: process.env.PIPEDREAM_CLIENT_ID!,
clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
projectEnvironment: "production",
})
const result = await pd.actions.run({
id: "twilio-make-phone-call",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
twilio: { authProvisionId: "apn_xxxxxxx" },
from: "From",
to: "To",
},
})from pipedream import Pipedream
pd = Pipedream(
client_id="{oauth_client_id}",
client_secret="{oauth_client_secret}",
project_id="{project_id}",
project_environment="production",
)
result = pd.actions.run(
id="twilio-make-phone-call",
external_user_id="{external_user_id}", # any stable ID for this user in your system
configured_props={
"twilio": {"authProvisionId": "apn_xxxxxxx"},
"from": "From",
"to": "To",
},
)curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
-H "Content-Type: application/json" \
-H "X-PD-Environment: production" \
-H "Authorization: Bearer {access_token}" \
-d '{
"external_user_id": "{external_user_id}",
"id": "twilio-make-phone-call",
"configured_props": {
"twilio": { "authProvisionId": "apn_xxxxxxx" },
"from": "From",
"to": "To"
}
}'TOOLS
Twilio actions
On-demand operations your product or agent can configure and run on behalf of a connected user.
-
Make a Phone Call
actionMake a phone call passing text, a URL, or an application that Twilio will use to handle the call. See the documentationWritev1.0.1 -
Check Verification Token
actionCheck if user-provided token is correct. See the documentationRead-onlyv0.0.5 -
Create Verification Service
actionCreate a verification service for sending SMS verifications. See the documentationWritev0.0.4 -
Delete Call
actionRemove a call record from your account. See the documentationWritev0.1.6 -
Delete Message
actionDelete a message record from your account. See the documentationWritev0.1.6 -
Download Recording Media
actionDownload a recording media file. See the documentationWritev0.1.9 -
Get Call
actionReturn call resource of an individual call. See the documentationRead-onlyv0.1.6 -
Get Message
actionReturn details of a message. See the documentationWritev0.1.6 -
Get Transcripts
actionRetrieves full transcripts for the specified transcript SIDs. See the documentationRead-onlyv0.0.3 -
List Application SID Options
actionRetrieves available options for the Application SID field.Read-onlyv0.0.1 -
List Call ID Options
actionRetrieves available options for the Call ID field.Read-onlyv0.0.1 -
List Calls
actionReturn a list of calls associated with your account. See the documentationRead-onlyv0.1.6 -
List From Options
actionRetrieves available options for the From field.Read-onlyv0.0.1 -
List Incoming Phone Number Options
actionRetrieves available options for the Incoming Phone Number field.Read-onlyv0.0.1 -
List Message Media
actionReturn a list of media associated with your message. See the documentationWritev0.1.6 -
List Messages
actionReturn a list of messages associated with your account. See the documentationRead-onlyv0.1.7 -
List Parent Call SID Options
actionRetrieves available options for the Parent Call SID field.Read-onlyv0.0.1 -
List Recording ID Options
actionRetrieves available options for the Recording ID field.Read-onlyv0.0.1 -
List Service SID Options
actionRetrieves available options for the Service SID field.Read-onlyv0.0.1 -
List Transcript SIDs Options
actionRetrieves available options for the Transcript SIDs field.Read-onlyv0.0.1 -
List Transcripts
actionReturn a list of transcripts. See the documentationRead-onlyv0.0.4 -
Phone Number Lookup
actionLookup information about a phone number. See the documentation for more informationRead-onlyv0.0.4 -
Send Message
actionSend an SMS text with optional media files. See the documentationWritev0.0.4 -
Send SMS Verification
actionSend an SMS verification to a phone number. See the documentationWritev0.0.5
-
New Incoming SMS (Instant)
triggerEmit new event every time an SMS is sent to the phone number set. Configures a webhook in Twilio, tied to an incoming phone number.Instantv0.1.6 -
New Call (Instant)
triggerEmit new event each time a call to the phone number is completed. Configures a webhook in Twilio, tied to a phone number.Instantv0.1.6 -
New Phone Number
triggerEmit new event when you add a new phone number to your accountv0.1.7 -
New Recording
triggerEmit new event when a new call recording is createdv0.1.7 -
New Transcript Created
triggerEmit new event when a new call transcript is createdv0.0.3
MULTI-APP
Use Twilio with other popular apps
Most products don't stop at one integration. Pair Twilio with the other apps your users rely on, and ship use cases that span both.
- App slug
- twilio
- Authentication
- API key
- Categories
- Communication
- Actions
- 24
- Triggers
- 5
- API proxy
- Available