Magentrix allows for integration with Twilio in order to send SMS messages. To configure it complete the following steps:
Login as an Administrator, then navigate to Setup > Extend > Connected Apps.
Click New to create a new Connected App. In the configuration wizard set the following:
Integration Type "API Provider"
Authentication Type “Basic”
Authorization Information:
- Name: Twilio
- Service URL: https://api.twilio.com/
- Username: <your Twilio Account SID>
- Password: <your Twilio Auth Token>
- Security Token: <your Active Phone Number>
- Click Save.
Note: You may obtain the account API credentials in your Twilio account General Settings. The phone number can be found in the Active Numbers. You may need to create a number. The security token formatting is very strict, so you must use the exact format Twilio provides.
Example:
+16465550000
Once the Connected App is configured you can call these methods in your code as provided below.
Messaging.Twilio twilio = new Messaging.Twilio("Twilio");
//Twilio is the name of the Connected App you have created
var response = twilio.SendSMS("to phone", "your message");
OR
var response = twilio.SendSMS("from phone", "to phone", "your message");
OR
var response = twilio.SendSMS(new { From="", To:"", Body="your message" });
For more information, see Twilio's documentation.