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.
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.
Go to the Twilio website and click Sign up to register a new account.
By default, a free trial account is created.
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.
Obtain a Twilio phone number by following the instructions provided in these articles:
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
).In the Request Method dropdown, 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).
In the Request Method dropdown, select HTTP POST.
Click Create to create the 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:
Navigate to System > SMS Providers, and then click +Create in the upper-right corner of the page.
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
).In the Provider dropdown, select Twilio.
Click Save to save the configuration.
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.
Make sure that the Enabled field is set to Yes.
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:
Navigate to System > External Connections, and then click +Create in the upper-right corner of the page.
In the Create connection popup, 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.
In the Provider dropdown, select TwilioVoice.
Click Save to save the connection.
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.
In the Enabled dropdown, select Yes.
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:
Navigate to Clients > General.
Select the client and click the Edit button.
Go to the Contacts tab.
If no error message is displayed in the Back Office, the Twilio connection is configured properly.
Last updated