---
title: Twilio (SMS and WhatsApp)
slug: docs-agent/twilio-sms-and-whatsapp
docTags: 
createdAt: 2026-09-25T19:48:16.033Z
---

Send SMS and WhatsApp messages from your project: order updates, confirmations, alerts.

## Connect

1. Create a free account at [twilio.com](https://www.twilio.com/try-twilio). It comes with trial credit.
2. In the [Twilio Console](https://console.twilio.com), under **Account Info**, copy the **Account SID** (starts with `AC`) and the **Auth Token**.
3. Ask the Agent for an SMS or WhatsApp feature, or open **Connections → Twilio**, and paste both.

## Get a phone number

Your project sends from a Twilio phone number. Buy one in the Twilio console (around US$ 1/month), then click **Re-check** on the connection. Back4app picks up the number automatically.

## SMS on a trial account

Trial accounts can only send to phone numbers you verified in the Twilio console. Upgrade your Twilio account to send to anyone.

## WhatsApp

| Stage      | What you need                                                                                                                                 |
| ---------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| Testing    | Twilio's WhatsApp test environment (*Sandbox for WhatsApp* in the console). Each test phone must first send the join code to the test number. |
| Real users | A WhatsApp sender approved by Meta, requested through Twilio.                                                                                 |

## Good to know

- If the connection says **Invalid**, copy the SID and token again from the main account, not from a subaccount.
- If the connection says the account has no phone number, buy one and click **Re-check**.
