How to configure Twilio
Learn how to configure Twilio in B2CORE for sending 2FA SMS codes and making client calls via the B2CORE Back Office
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.
Go to the Twilio website and sign up to create a new account.
By default, a free trial account is created.
Sign in to your account and upgrade it to go live by clicking the Upgrade link.
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.
Voice Configuration
In the Request URL field, 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.
Messaging Configuration
In the Request URL field, 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.
Click +Create in the upper-right page corner.
In the displayed popup, 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:
Navigate to System > External Connections.
Click +Create in the upper-right page corner.
On the Create connection page, 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.
The Twilio connection will appear in the list of external connections.
Click the Edit button to open the connection details.
On the Edit connection page, fill in 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 TwiML App SID field, specify your TwiML App SID.
Check the connection status.
If the connection is inactive (No is displayed in the Enabled dropdown), set the Enabled dropdown to Yes.
Click Save to apply the changes.
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.
Click the phone button displayed in the Phones section to dial a specified client's phone number using Twilio.
If you have several Twilio numbers, you can select the number you want to use for calling in the displayed popup.
If no error message is displayed in the Back Office, the Twilio connection is configured properly.
Last updated
Was this helpful?