PingOne

Using a custom 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 → Sender.

  2. Select SMS/Voice.

    The default Ping Server appears, until a Custom Server or Custom Provider is configured for the environment.

  3. Select Custom Provider.

    Selecting Ping Identity or Custom Server deletes any existing custom provider configuration, if one exists.

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

  5. Authorization: Select Basic and then enter

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

    2. 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.

  6. Origination: Click 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).
  7. Optional: Fallback to Ping Twilio account: Configure the fallback setting, to handle notification dispatch if your custom provider service becomes unavailable for any reason: Enter the phone number that sends the notification. You can leverage shortcodes and toll-free numbers for increased throughput for US numbers.

    • By default, the fallback option is set to Disable. No notifications will be sent while your custom provider service is unavailable.

    • Select Enable to use Ping Identity’s sender account to fall back to as an alternative and handle notification dispatch, while your Twilio account is unavailable.

  8. SMS:

    To direct SMS devices to the Twilio Studio flow, configure this section.

    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 Add Key, Value for each additional entry.

      Key Value

      From

      ${from}

      to

      ${to}

      Parameter

      ${message}

      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.

  9. Voice:

    To use Twilio studio to send voice messages, configure this section.

    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 Add Key, Value for each additional entry.

      Key Value

      From

      ${from}

      To

      ${to}

      Parameters

      ${message}

      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.

  10. Click Save.

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

    1. Right-click theMore options icon and select Edit.

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

      You can include additional parameters, such as username in the message. For example:

      +

      {"OTP":${otp}, "username":${username}}

    You can also use dynamic variables in the Body section. For more information, see Dynamic variables in the PingOne Platform API Reference.

  12. Check your configuration:

    • To check SMS configuration, in the SMS area, clickSend Test SMS and in the popup window 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, clickSend Test Voice and in the popup window 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.