Introduction

Descope's Twilio Verify connector allows you to utilize the Twilio Verify SDK and service to authenticate users via Voice, SMS, and email for OTP rather than utilizing Descope OOTB OTP verification functions. This article will guide you through setting up and using the Twilio Verify connector.

Note: You cannot customize the OTP template within Descope when utilizing the Twilio Verify connector. You must rely on the configured templates within your Twilio Verify account.

Configure Twilio Verify Connector

Descope uses your Twilio Verify Account SID, Service SID, and the API Key and Secret or the Auth token to authenticate the connector to the Twilio Verify API.

To configure the Twilio Verify connector, navigate to the Connectors page within the Descope console, search for Twilio Verify, and click the tile.

Settings

Below is the list of settings and configurations available that you can customize for your Twilio Verify Connector.

  • 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.
  • Service SID: A unique key that identifies the Twilio Verify service.
  • 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 Email address (only for email verification): A verified Twilio (Sendgrid) email address you own. Defines the email sender.
You can test if your connector's configuration is working properly simply by hitting the Test button and viewing the Test Results panel.

Configuring and testing Descope's Twilio Verify connector.

Save your configuration by hitting Create.

Using Twilio Verify in Auth Methods and Flows

Configure Twilio Verify as the Default OTP Connector

To configure Twilio Verify as your default connector for the various OTP auth methods for SMS, Voice, and Email, navigate to OTP within Authentication Methods, and select the configured Twilio Verify connector. Note that you will see the templates option disappear because you cannot customize the OTP template within Descope when utilizing the Twilio Verify connector. You must rely on the configured templates within your Twilio Verify account.

Once you have configured Twilio Verify as the default connector within the OTP Auth method, Descope flows and any OTP calls via the API/SDK will utilize Twilio Verify for OTP verification.

Configuring Twilio Verify as the default OTP connector within Descope Authentication Methods.

Using Twilio Verify Explicitly in Flows

To override the default OTP connector within your flow to utilize Twilio Verify, navigate to Flows and choose your flow. Once you are in the flow that you'd like to use Twilio Verify, select and edit the action that starts the OTP process, such as Sign In, Sign Up, or Sign Up or In with OTP via SMS, Email, or Voice. If you have not yet added the OTP action, you can do so by clicking the blue + icon at the top left, searching and selecting the OTP action, and then selecting and editing the initiating action.

In this example, we will update the Sign Up or In / OTP / SMS action to utilize the Twilio Verify connector and override the configured default for the OTP auth method.

Once in edit mode for the initiating OTP action, select the dropdown for the connector and choose your Twilio Verify connector. After selecting the Twilio Verify connector, click done, and save your flow. Note that you will see the templates option disappear because you cannot customize the OTP template within Descope when utilizing the Twilio Verify connector. You must rely on the configured templates within your Twilio Verify account.This action within your flow will utilize the Twilio Verify connector and override the configured default OTP connector.

Configuring Twilio Verify as the default OTP connector within Descope Authentication Methods.