Using a Leanplum webhook, you can send text messages through the Twilio API.
Be sure to set the webhook URL to the correct Twilio API endpoint, entering your Account SID and Auth Token in the URL as shown below. This is required for authentication to Twilio's service.
NOTE: For more, see Twilio's API docs on Sending Messages.
This is required by Twilio to receive the webhook successfully.
Twilio requires the following three parameters and values to be sent in the request. These will need to be added as Data attributes as shown in the picture below.
The destination phone number. You should set each user's phone number as a user attribute in Leanplum, so you can use it to dynamically personalize each webhook with the correct phone number for that user.
Format it with a '+' and country code e.g., +16175551212 (E.164 format).
A Twilio phone number (in E.164 format) or alphanumeric sender ID enabled for the type of message you wish to send. Phone numbers or short codes purchased from Twilio work here. You cannot (for example) spoof messages from your own cell phone number.
The text of the message you want to send, limited to 1600 characters.
For a general overview, see our Send a Webhook doc.
Updated about 1 year ago