---
title: Using a Twilio account with PingOne to support Twilio Studio flows
description: To use Twilio studio flows, configure Twilio as a custom provider and then define the specific flows that you want to use. You'll also need to configure the relevant PingOne notifications for use with the relevant Twilio flow.
component: pingone
page_id: pingone:settings:p1_use_twilio_with_p1_to_support_twilio_studio_flows
canonical_url: https://docs.pingidentity.com/pingone/settings/p1_use_twilio_with_p1_to_support_twilio_studio_flows.html
revdate: May 10, 2024
section_ids:
  steps: Steps
---

# Using a Twilio account with PingOne to support Twilio Studio flows

To use Twilio studio flows, configure Twilio as a custom provider and then define the specific flows that you want to use. You'll also need to configure the relevant PingOne notifications for use with the relevant Twilio flow.

## Steps

1. Go to **Settings > Senders**.

2. Click **+**, enter the following options, and then click **Next**:

   1. In the **Sender Type** list, select **SMS/Voice**.

   2. In the **Provider Type** list, select **Custom Provider**.

3. In the **Provider Configuration** window, enter the following information:

   1. **Provider Name**: Enter a meaningful name for your Twilio provider account.

   2. **Authorization**: Select **Basic** and then enter the following information:

      * **User Name**: Enter the Twilio Studio account `sid` as your username.

      * **Password**: Enter the Twilio Studio account token as your password.

        |   |                                                                                                                                   |
        | - | --------------------------------------------------------------------------------------------------------------------------------- |
        |   | When editing an existing configuration, you can click **Change Account** to enter a new password for the custom provider account. |

4. **Origination**: Click **[icon: plus, set=fa]Add Sender Phone Number** to configure a sender phone number, and for each number entered, select the following:

   1. **Type**: Select the type of phone number

      * **Standard**: The sender **Number** must conform to the valid format of a full international phone number.

      * **Toll-free**: The sender **Number** should be a valid toll-free phone number (US only). It is the customer's responsibility to confirm that the number is toll free.

      * **Short code**: The sender **Number** must conform to the valid format of a short code phone number (US only). It is the customer's responsibility to confirm that the number is a short code.

   2. Select at least one of the **SMS** or **Voice** checkboxes to define which device type is directed to the studio flow.

      |   |                                                                                                     |
      | - | --------------------------------------------------------------------------------------------------- |
      |   | The studio flow defines the actual method that will be used to send the OTP (SMS, Voice, or other). |

5. To direct SMS devices to the Twilio Studio flow, select the **SMS** checkbox and configure the following fields:

   1. **Type**: Select the **POST** operation to issue a POST request to the Twilio REST API.

   2. **URL**: Enter the full URL for the Twilio Studio flow you want to use: `https://studio.twilio.com/v2/Flows/<flowID>/Executions`

   3. **Body**: The request body format style for configuration maintenance. In the list, select **Form** and then add the following key and value pairs. Click **[icon: plus, set=fa]Add Key, Value** for each additional entry.

      | Key       | Value                                                                                                                                                         |
      | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
      | From      | ${from}                                                                                                                                                       |
      | to        | ${to}                                                                                                                                                         |
      | Parameter | ${message}&#xA;&#xA;This takes the notification value defined in Experiences → Notifications. The message text is defined in the last step of this procedure. |

      |   |                                                                                                                                                                                                                              |
      | - | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
      |   | When saving, be aware that changing the request body's format style from **Form** deletes the request body's key and value pairs, and changing the format style from **Raw** deletes the request body's free-form JSON text. |

6. To use Twilio studio to send voice messages, select the **Voice** checkbox and configure the following fields:

   1. **Type**: Select the **POST** operation to issue voice notification requests to the associated vendor **URL** endpoint.

   2. **URL**: Enter the following URL, including the flow ID for the Voice communication flow from Twilio studio: `https://studio.twilio.com/v2/Flows/<flowID>/Executions`

   3. **Body**: The request body format style for configuration maintenance. In the list select **Form** and then add the following key and value pairs. Click **[icon: plus, set=fa]Add Key, Value** for each additional entry.

      | Key        | Value                                                                                                                                                         |
      | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
      | From       | ${from}                                                                                                                                                       |
      | To         | ${to}                                                                                                                                                         |
      | Parameters | ${message}&#xA;&#xA;This takes the notification value defined in Experiences → Notifications. The message text is defined in the last step of this procedure. |

      |   |                                                                                                                                                                                                                              |
      | - | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
      |   | When saving, be aware that changing the request body's format style from **Form** deletes the request body's key and value pairs, and changing the format style from **Raw** deletes the request body's free-form JSON text. |

7. Click **Save**.

8. Go to **User Experience > Notification Templates** and for each notification type that you want to use with Twilio Studio:

   1. Right-click the**More options** icon and select **Edit**.

   2. In the **New Message** field for the relevant authentication method, enter` \{"OTP":${otp}}`

      |   |                                                                                                                                        |
      | - | -------------------------------------------------------------------------------------------------------------------------------------- |
      |   | You can include additional parameters, such as username in the message. For example:```json
      {"OTP":${otp}, "username":${username}}
      ``` |

   You can also use dynamic variables in the Body section. For more information, see [Dynamic variables](https://developer.pingidentity.com/pingone-api/platform/notifications/notifications-templates.html#notifications-templates-dynamic-variables) in the PingOne Platform API Reference.

9. Check your configuration:

   * To check SMS configuration, in the **SMS** area, click **Send Test SMS** and in the modal, enter a destination phone number to test receiving an SMS notification from Telesign, and then click **Send**. A test SMS notification should be received on the destination phone.

   * To check Voice configuration, in the **Voice** area, click **Send Test Voice** and in the modal, enter a destination phone number to send a Voice notification from Telesign, and then click **Send**. A test voice notification should be received on the destination phone.
