# Set up a Twilio Account

Before you begin, you will need the following:

* Paid Twilio Account with an associated phone number (Trial accounts are not supported)
* CrossEngage Account
* User data that includes a phone number

## Buying a Number

{% hint style="warning" %}
The following is an example of how to buy a number. If you want to be sure that you do this correctly, contact Twilio or your account manager for support.
{% endhint %}

You need to have at least one phone number associated with Twilio to use your Twilio account with CrossEngage. To buy a number, follow the steps below:

* [Log in](https://www.twilio.com/login) to your Twilio account.
* In the Account Info section, click on View all Numbers.

<figure><img src="https://985110910-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0Hio8LJewN8lQY2Vlqy0%2Fuploads%2FNAVX5xvuAZD30uxTtv21%2FTwilio_Numbers.png?alt=media&#x26;token=8db71b67-72f9-435f-8394-c48c07b7e8f6" alt=""><figcaption></figcaption></figure>

* You can buy a number from Twilio by clicking on the Buy a Number button and choosing a number to buy.

<figure><img src="https://985110910-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0Hio8LJewN8lQY2Vlqy0%2Fuploads%2Fni5aNIAIZhnsjaoyvo1v%2FTwilio_BuyNumber.png?alt=media&#x26;token=920dcce5-1bfd-4cdd-b1ad-d3b2fb10dd98" alt=""><figcaption></figcaption></figure>

### Enable Certificate Validation

We recommend enabling certificate validation as it serves as an additional security measure. Have a look at the [Security Update On SSL Certificate Validation](https://www.twilio.com/blog/2016/02/security-update-on-ssl-certificate-validation.html) blog post to learn more.

To enable SSL Certificate Validation, follow the steps below:

* [Log in](https://www.twilio.com/login) to your Twilio account.
* In the top right corner of the screen, open the Account menu and choose General Settings.
* In the "General settings" section, scroll down to the "SSL Certificate Validation" heading and click `ENABLED`.&#x20;

<figure><img src="https://985110910-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0Hio8LJewN8lQY2Vlqy0%2Fuploads%2F3v5mIJ5m9yXGX75G0vod%2FTwilio_GeneralSettings.png?alt=media&#x26;token=0c942c50-ed8c-446f-9af5-5b4695879eb9" alt=""><figcaption></figcaption></figure>

### Configure user attributes

We suggest you to use the "traits.phone" user attribute when using Twilio. The user attribute should include a phone number formatted according to the E.164 specification. For example: +4917612345678. [This Twilio article](https://support.twilio.com/hc/en-us/articles/223183008-Formatting-International-Phone-Numbers) about formatting international phone numbers goes into more detail.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.crossengage.io/data-and-engagement-platform/messages/integrations/channels/sms/twilio/set-up-a-twilio-account.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
