Skip to main content

Overview

Buckle connects AI agents to Twilio with an API key. Agents can send and read SMS, MMS, and WhatsApp messages, place calls and read call logs, look up phone numbers, and send one-time verification codes. The gateway signs every request with the key, so your agent never sees it. This suits support and operations agents: texting a customer an update, checking whether a message was delivered, or verifying a phone number before an account change. Connecting takes about two minutes.

What you will set up

  • A Twilio API key (SID and secret) in your account’s region
  • Automatic credential injection on Twilio API requests
  • Per-agent, per-tool access, such as approval before sending messages

Connect Twilio

1

Create an API key in Twilio

In the Twilio Console, select API keys & tokens on the home page (or open Account > API keys & tokens), then select Create API key.
Twilio Console home page showing the account card with a masked Account SID, a hidden Auth Token, and the API keys & auth tokens link.

The Twilio Console home page. API keys & tokens is under your Account SID and Auth Token.

Select Create, then copy the key’s SID (it starts with SK) and its Secret. Twilio shows the secret only once.
Prefer an API key over your Auth Token. You can revoke a key on its own, without touching anything else that uses your account. Avoid Main keys: they can manage subaccounts and other keys, which agents don’t need.
2

Paste it in Buckle

In the Buckle dashboard, open Settings > Apps > Twilio and fill in the form.
Buckle connect window for Twilio, showing the setup guide link, the Region dropdown set to United States (US1), the API key SID and API key secret fields, and the Connect Twilio button.

The Twilio connect window in Buckle.

Select Connect Twilio. Buckle checks the key with Twilio in that region before saving it, so a wrong secret, or a key from another region, is rejected right away.You don’t need to enter your Account SID. Buckle looks it up from the key and uses it as the connection’s name, so agents know which account they are working in.
If you can’t create an API key, paste your Account SID (it starts with AC) into API key SID, and your Auth Token into API key secret. Both are on the Twilio Console home page.
The Auth Token has full access to your account. If it leaks, you have to rotate it, which breaks everything else that uses it. An API key is safer.
Twilio keeps credentials per region: a US1 key doesn’t work in IE1 or AU1. Agents can always call the US hosts in Twilio’s docs, such as https://api.twilio.com. For an IE1 or AU1 connection, the gateway sends each request to that region’s host for you.

What agents can do

Some products, including Studio, Conversations, and Functions, aren’t available on Twilio trial accounts. On a trial account, Twilio only sends messages and calls to phone numbers you’ve verified.

Quick example

No Authorization header is needed. The gateway adds Twilio’s Basic auth:
For every endpoint and parameter, see the Twilio API reference.

Controlling access

Grant the connection to each agent that needs it, and choose per tool what runs freely, what needs approval, and what’s blocked. Twilio writes reach real people and cost money. Send a message, Place a call, and Send a verification code each contact someone, and Buy, configure, or release phone numbers changes what you’re billed for. A good default is to let agents read messages, calls, and lookups freely, and put every one of those writes behind approval. Organization rules add guardrails on top. A blocked request never reaches Twilio. To disconnect, remove the connection in Settings > Apps > Twilio, then delete the key in the Twilio Console under Account > API keys & tokens.

FAQ

Create a new API key in the Twilio Console, then update it in Settings > Apps > Twilio. Agents pick it up automatically. Then delete the old key.
Don’t set TWILIO_AUTH_TOKEN in the agent’s environment. Store the API key in Buckle, and the gateway injects it at the proxy. See How it works.
Prefer an API key. You can revoke it on its own without touching anything else that uses your account. Avoid Main keys.
Yes. Put sending tools behind approval when you grant the connection.