Introduction

Using Descope's connectors allows you to use Twilio to send SMS and make voice calls with your own Twilio account and trigger these actions within the authentication flow. This article will guide you through setting up and using the Twilio connector.

Configure Twilio connector

Descope uses your Twilio Account SID, Authentication token, API key, secret and sender details for integration.

Start at your dashboard. Navigate to the Twilio connector: Dashboard -> Connectors -> Twilio

Now, complete the required fields:

  • Connector name: Custom name for your connector. This will come in handy when creating multiple connectors from the same connector template.
  • Connector Description: Briefly describe the purpose of this connector.
  • Account SID: A unique key provisioned for Twilio customers that acts as a username.
  • Authentication: There are two ways of authenticating with Twilio service:
    • Auth token: The authentication token associated with the Account SID.
    • API key and secret: The preferred way to authenticate to Twilio's services; consist of a SID and a secret.
  • From: There are two ways to define the sender of the message:
    • Number: A Twilio number you own. Must start with a country code.
    • Messaging Service SID: If a messaging service is configured, one of the numbers in that service pool will be used. And if you'd like, the optional field:
  • From Phone number (for voice calls): A Twilio number you own. Defines the sender of the voice call. Must start with a + and country code.
You can test if your connector's configuration is working properly simply by hitting the Test button and viewing the Test Results panel.

Twilio connector initialization

Save your configuration by hitting Create.

Add your Twilio connector to a flow

Navigate to: Flows, choose your flow. Then, tap the create button (designated via the + icon), select Connector, and choose Twilio.

Click to set down the connector in your flow editor and double click the widget to add required fields:

  • To: Who the message or call should be sent to. Setting this dynamically based on previous attributes is recommended (eg. {{user.phone}}). As you type in the input field, options appear.
  • Message/Call content: Enter the content of the SMS or call.

Twilio connector widget input

Now, link your connector at a logical point in your authentication flow, likely at the end of the flow after the phone number has been submitted by the user.


Twilio connector placement

That's it! Whenever a user goes through your authentication flow, the Twilio connector will be automatically triggered.