> ## Documentation Index
> Fetch the complete documentation index at: https://docs.runalloy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Twilio

> Integration details and setup guide for the Twilio connector in Alloy Automation.

## Pre-Built Tooling

| Category                            | Details                                         |
| ----------------------------------- | ----------------------------------------------- |
| **Authentication**                  | Basic Authentication (Account SID + Auth Token) |
| **Two-Way Sync**                    | Yes                                             |
| **Events Supported**                | Yes (via Webhooks/StatusCallbacks)              |
| **Realtime**                        | Yes (Webhooks)                                  |
| **Supports Rate Limiting**          | Yes (varies by product)                         |
| **Authentication Scopes Supported** | N/A (Account-level access)                      |

***

## Objects Supported

* **Messages** - SMS and MMS messages
* **Calls** - Voice calls and recordings
* **Phone Numbers** - Purchased phone numbers
* **Conversations** - Multi-channel conversations
* **Recordings** - Call recordings
* **Transcriptions** - Call transcriptions

***

## Set Up Guide

### Trial Access

| Question                                           | Answer                                                                                                                |
| -------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| **Offers free trial?**                             | Yes. Twilio provides \$15.50 in trial credit upon signup. [Sign up for free trial](https://www.twilio.com/try-twilio) |
| **Requires paid sandbox**                          | No. Trial mode can be used for development with some limitations.                                                     |
| **Requires partnership to obtain authentication?** | No. Anyone can create a Twilio account.                                                                               |

***

### Authentication (Basic Auth)

<step>
  ## Step 1: Create a Twilio Account

  1. Visit [https://www.twilio.com/try-twilio](https://www.twilio.com/try-twilio)
  2. Sign up with your email and create an account
  3. Verify your email and phone number
  4. You'll receive \$15.50 in trial credit
</step>

<step>
  ## Step 2: Retrieve Credentials

  1. Log into the Twilio Console ([https://console.twilio.com/](https://console.twilio.com/))
  2. Your **Account SID** and **Auth Token** are displayed on the dashboard
  3. Click "Show" to reveal the **Auth Token**
  4. Copy both values securely
</step>

<step>
  ## Step 3: Connect to Alloy Automation

  1. Provide your **Account SID** (username) and **Auth Token** (password)
  2. Twilio uses Basic Authentication with these credentials
  3. Test by sending a test SMS or retrieving phone numbers
</step>

***

## Use Cases

### 1) Transactional SMS notifications

Send order confirmations, shipping updates, appointment reminders, and security alerts via SMS integrated with e-commerce, booking, or CRM platforms.

### 2) Two-factor authentication (2FA)

Implement phone-based 2FA by sending verification codes via SMS and validating user responses through API integrations.

### 3) Customer communication automation

Enable automated customer communication via SMS, voice calls, or WhatsApp based on CRM events, support tickets, or workflow triggers.

### 4) Voice call automation

Create automated voice workflows with IVR, call routing, call recording, and transcription for customer support or sales operations.

### 5) Multi-channel messaging

Integrate Twilio's Conversations API to enable unified messaging across SMS, WhatsApp, Facebook Messenger, and other channels.

***

## API Gotchas

* **Trial Account Limitations:** Trial accounts can only send messages to verified phone numbers. You must verify recipient numbers in the console or upgrade to a paid account for unrestricted messaging.

* **Message Segment Pricing:** SMS messages are billed per segment (160 characters for GSM, 70 for Unicode). Long messages are split into multiple segments. Monitor message length to control costs.

* **Webhook Signature Verification:** Always validate webhook requests using the `X-Twilio-Signature` header and your Auth Token to prevent spoofed requests.

* **Rate Limits Vary by Product:** SMS sending has different rate limits per phone number and account. Voice calls have concurrent call limits. Monitor usage and request limit increases if needed.

> For questions or troubleshooting, contact **[support@runalloy.com](mailto:support@runalloy.com)**.
