Table of Contents


Messaging.Twilio

Using the Twilio class you can send SMS messages internationally by utilizing your existing Twilio subscription.

MethodArgumentsReturns
SendSMSstring to,
string body

HttpResponseInfo

SendSMS

string from,
string to,
string body

HttpResponseInfo

SendSMSobject

HttpResponseInfo

 Note that the Twilio credentials should be stored and registered as a Connected App setting within Magentrix.

Below is an example of how you can pass the Connected App credentials to the Twilio API class and use them to send SMS messages.

var twilio = new Messaging.Twilio("connected_app_name");

//advanced method
twilio.SendSMS(new { From="Number configured", To="+1 416 222 3333",Body="Here is a test SMS" });

//simple method
twilio.SendSMS("+1 416 222 3333","Here is a test SMS");