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:
- Account SId
- Auth Token
- 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
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
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.
Once you are done with settings, move here to see how to create your campaigns.