# Twilio

The [SMS](https://docs.getmesa.com/tools/sms) tool is a great way to quickly send SMS messages. However, if you need to send international messages or send a high volume of messages, we recommend using the Twilio app to send messages from a dedicated phone number you control. Twilio charges a monthly fee to purchase the phone number (typically $1 per month) and a [per-SMS fee](https://www.twilio.com/sms/pricing/) (typically around a cent per message).

* [Connect Twilio with MESA](#connect)
* [Configuration](#configuring)

## Connection <a href="#connect" id="connect"></a>

Before you get started, you will need to [create a Twilio account](https://www.twilio.com/try-twilio), add your billing information, and [purchase a phone number](https://support.twilio.com/hc/en-us/articles/223135247-How-to-Search-for-and-Buy-a-Twilio-Phone-Number-from-Console) in the Twilio console.

When you're setting up your first workflow with Twilio, you'll need to add your **Key** and **Secret** so that Twilio is a connected app within MESA.

<figure><img src="https://3425906282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1H6u1HQc3Iew7ATmmiCi%2Fuploads%2FF3ET1MvXMp9msqLHlfzc%2Fimage.png?alt=media&#x26;token=1dbe282e-213a-472c-a04f-df71f18b3671" alt=""><figcaption></figcaption></figure>

You can [click here to locate your Account SID and Auth Token](https://www.twilio.com/console/project/settings). Within the Twilio Settings, click on the Keys & Connections: API keys & tokens section.

![](https://3425906282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1H6u1HQc3Iew7ATmmiCi%2Fuploads%2FhK0gTiOvaZpti1FfzDox%2FAS-TWILIO-API.png?alt=media\&token=a61e0974-02e8-44ea-90c3-ed9c6a364fe8)

In the **Live Connections** section:

* Copy the Account SID and paste that as the Key within MESA.
* Copy the Auth Token and paste that as the Secret within MESA.

<figure><img src="https://3425906282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1H6u1HQc3Iew7ATmmiCi%2Fuploads%2FBS20kxJEztvV2KbSz8FO%2FAS-TWILIO-AUTH.png?alt=media&#x26;token=78896bab-d280-4f75-a39d-73a23c153ed9" alt=""><figcaption></figcaption></figure>

Then, click on Add Connection.

### Configure <a href="#configuring" id="configuring"></a>

In order to send a SMS, you will need to add a phone number into the From phone number field. Make sure that the phone number that you enter **does not** contain dashes or parenthesis but **do** contain a country code. An example: +15017122661

In the To phone number field, you can [utilize variables](https://docs.getmesa.com/workflow-builder/fields/variables) to make the SMS action specific to your needs. The screenshot below is from the [Send an SMS via Twilio to your customers when their order arrives template](https://www.getmesa.com/connect/tracktor/integrate/twilio/send-a-twilio-sms-to-your-customer-when-their-order-arrives).

![](https://3425906282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1H6u1HQc3Iew7ATmmiCi%2Fuploads%2FJsfDtTLio9humO0LESkT%2FAS-TWILIO-CONFIGURE.png?alt=media\&token=dfd9b641-6c16-4428-90ec-40ddc9e82230)
