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 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


Configure API URL with POST method. Your API URL will be:  (replace AccountSid with your Account's actual SId) e.g.

Add Headers


Add Body

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


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.


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.


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