Send SMS via Twilio

Step 1: Get Twilio Account Details and create a Base 64 Authorization password

Before setting up Twilio as your connector, ensure that you have these three details available:

  1. Account SId
  2. Auth Token
  3. Number with which you would want to send

You can find these details in Twilio Console once you log in to your Twilio Account. Once you have these details (namely 1& 2), you now need to create a Base 64 encoded authentication.

Create Base 64 Authorization Code

Go to https://www.base64encode.org/ and Copy&Paste your Twilio AccountSid and Auth Token separated by a colon (":") i.e. if you Account SId is "ACce123d454c6c78e90d1f234b5ef67eb" & Auth Toke is "a9d98765432101e974b95b2435074fc1" , string to be encoded is "ACce123d454c6c78e90d1f234b5ef67eb:a9d98765432101e974b95b2435074fc1". Click on Encode. You will have a Base 64 code which looks something like "QUNjZTEyM2Q0NTRjNmM3OGU5MGQxZjIzNGI1ZWY2N2ViOmE5ZDk4NzY1NDMyMTAxZTk3NGI5NWIyNDM1MDc0ZmMx"

Step 2: Set-up SMS Connector on MoEngage

To add Twilio as your SMS Connector, navigate to MoEngage Dashboard > Settings > Channel > SMS & Connectors and click SMS Connector Config.

Setting up Custom Connector

Configure API URL

Screen_Shot_2019-01-11_at_2.52.54_PM.png

Configure API URL with POST method. Your API URL will be: https://api.twilio.com/2010-04-01/Accounts/AccountSid/Messages.json  (replace AccountSid with your Account's actual SId) e.g. https://api.twilio.com/2010-04-01/Accounts/ACce123d454c6c78e90d1f234b5ef67eb/Messages.json

Add Headers

Screen_Shot_2019-01-11_at_2.54.11_PM.png

Add Body

Choose Body Type as Form. Add keys for your Sender number (From). Other keys will remain as mentioned.

Screen_Shot_2019-01-11_at_2.56.00_PM.png

Once configured, Save it.  To test if your config is working, try Send SMS to Test. 

Note: We do not track SMS delivery for Custom Connector.

Updating SMS General Settings

Upon completion of the steps, refresh the page, navigate to MoEngage Dashboard > Settings > Channel > SMS & Connectors, click SMS General Settings and from the drop-down list select the Current Provider. You should also set the attribute which saves your User's Mobile Number so that our system knows which attribute, the end-user Mobile number has to be picked from, before sending an SMS.

For sending via Twilio, your number should be in E.164 format.

SMSGeneralSettings.png

3. Navigate to MoEngage Dashboard > Settings > Channel > SMS & Connectors and click FC & DND  to set frequency capping for your SMS campaigns to regulate the number of messages being sent in a certain duration. Read more about Frequency Capping for SMS.

SMSFC_Settings.png

After the settings are completed, refer to how to create your campaigns.

Was this article helpful?
0 out of 0 found this helpful