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, you need to set it as a Custom Connector in SMS Settings.

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

Once above step is done, Refresh the page and go to SMS General Settings. There you can choose the SMS Provider from the drop-down. You should also set the attribute which saves your User's Mobile Number so that our system know which attribute, the end user Mobile number has to be picked from, before sending a SMS.

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

Screen_Shot_2017-07-21_at_11.38.34_AM.png

3. Set frequency capping for your SMS campaigns to regulate the amount of messages being sent in certain duration. Read more about Frequency Capping for SMS here.

Screen_Shot_2017-06-23_at_2.41.29_PM.png

Once you are done with settings, move here to see how to create your campaigns.

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