How to configure Twilio

You can configure B2Core to use the Twilio communication platform to deliver 2FA codes via SMS or make phone calls to your clients via the Back Office.

The following information is required to configure a connection to Twilio via the Back Office:

  • Twilio account SID

  • Twilio authentication token

  • Twilio phone number

  • TwiML App SID

How to sign up with Twilio

This instruction describes how to sign up with Twilio and obtain the required information to connect to Twilio via the Back Office.

Note

This instruction is created based on the latest version of Twilio as of this writing. Due to possible changes to the procedures described here, we suggest that you consult the official Twilio documentation or contact their support in case you have any questions.

  1. Go to the Twilio website and click Sign up to register a new account.

    By default, a free trial account is created.

  2. Sign in to your account and upgrade it to go live by clicking Upgrade your account.

    Once the account is upgraded, your Twilio account SID and authentication token are generated automatically.

  3. Obtain a Twilio phone number by following the instructions provided in these articles:

  1. Create a TwiML App by following these steps:

  • Go to the TwiML Apps page. This page is available after signing in to your Twilio account.

  • Click Create new TwiML App.

  • Fill out the TwiML App form:

    • In the Friendly Name field, specify a name for your app.

    • In the Request URL field displayed in the Voice Configuration pane, specify a URL for your voice app webhook (such as api.company.name.com/api/v1/voice/twilio-webhook).

    • From the Request Method drop-down list, select HTTP POST.

    • In the Request URL field displayed in the Messaging Configuration pane, specify a URL for your messaging app webhook (which is a URL of your B2Core Back Office).

    • From the Request Method drop-down list, select HTTP POST.

    • Click Create to create the app.

Create a TwiML App

Once the app is created, your TwiML App SID is generated automatically.

Use the obtained Twilio account SID, authentication token, phone number and TwiML App SID to configure a connection to Twilio via the B2Core Back Office.

How to configure Twilio as a 2FA SMS provider

You can configure Twilio to deliver 2FA codes to your clients via SMS.

Before configuring Twilio as a 2FA SMS provider, make sure that you have obtained the following required information:

  • Twilio account SID

  • Twilio authentication token

  • Twilio phone number

To learn how to obtain the required information, refer to How to sign up with Twilio.

To configure Twilio as a 2FA SMS provider, do the following:

  1. Navigate to System > SMS > Providers, and then click +Create in the upper-right corner of the page.

  2. Fill in the following fields:

  • In the Name field, enter a name that you want to use for the configuration (such as twilio_sms).

  • In the Caption field, enter a caption that will be applied to the configuration in the Back Office (such as Twilio SMS).

  • From the Provider drop-down list, select Twilio.

  1. Click Save to save the configuration.

  2. On the Edit provider page, specify the following connection settings:

  • In the API sid field, specify your Twilio account SID.

  • In the API secret field, specify your Twilio authentication token.

  • In the Sender phone number field, specify your Twilio phone number.

  1. Make sure that the Enabled field is set to Yes.

  2. Click Save.

Twilio can now be used to deliver 2FA codes via SMS. To learn more, refer to How to set up 2FA with SMS.

How to configure Twilio as a phone service provider

Twilio can be configured to make phone calls to your clients via the Back Office.

Before configuring Twilio as a phone service provider, make sure that you have obtained the following required information:

  • Twilio account SID

  • Twilio authentication token

  • Twilio phone number

  • TwiML App SID

To learn how to obtain the required information, refer to How to sign up with Twilio.

To configure Twilio to make phone calls, do the following:

  1. Navigate to System > External Connections, and then click +Create in the upper-right corner of the page.

  2. In the Create connection window that is displayed, fill in the following fields:

  • In the Name field, enter a name that you want to use for the connection.

  • In the Caption field, enter a caption that will be applied to the connection in the Back Office.

  • From the Provider drop-down list, select TwilioVoice.

  1. Click Save to save the connection.

  2. On the Edit connection page, specify the following settings:

  • In the Account SID field, specify your Twilio account SID.

  • In the Auth token field, specify your Twilio authentication token.

  • In the Caller ID (Phone number) field, specify your Twilio phone number.

  • In the TwiML App SID field, specify your TwiML App SID.

  1. From the Enabled drop-down list, select Yes.

  2. Click Save to create the connection.

Twilio can now be used to make phone calls to your clients via the Back Office.

How to test the Twilio phone service operation

After you have configured a connection to Twilio for making phone calls via the Back Office, you can make a call to one of your clients to test the connection.

To make a call, do the following:

  1. Navigate to Clients > General.

  2. From the clients list, select a client, and then click Edit client to navigate to the client details page.

  3. Switch to the Contacts tab.

  4. Click the phone button phone-button displayed in the Phones section to dial a specified phone number using Twilio.

If no error message is displayed in the Back Office, the Twilio connection is configured properly.