The Twilio SMS Data Connector uses Twilio's Messaging API to send SMS messages.
This Data Connector extends the functionality of the Twilio Data Connector.
Once installed and added to a Form, you can access this Data Connector in the Form's server event scripts using: connectors.verjio.twilio
.
twilio.sendSms
send an SMS message to a specified phone number.
twilio.getSms
retrive details of a sent message.
Code Example:
// Send an SMS to +447551008330 with data from a previously created Content Template,
// referenced by a content id, and substituting 'Brian' into its contents.
var sms = connectors.verjio.twilio.sendSms(
'+441234567890',
'<your content id>',
{1: "Brian"} );
// Check the sending state of the SMS
var response = connectors.verjio.twilio.getSms(sms.sid);
if (response.status === connectors.verjio.twilio.sentStatus.SENT) {
event.owner.addInfoMessage(`The message was sent ${response.date_sent}`);
}
For comprehensive information on how to use and develop applications with this Data Connector please refer to the Support section.
The Installation section has instructions on installing it into your Workspace.
Complete JavaScript API documentation for this Data Connector can be found in the Documentation section.