BoxLang 🚀 A New JVM Dynamic Language Learn More...

TwilioAPI

v1.0 Plugins
--------------------------------------------------------------------------------------
USAGE
--------------------------------------------------------------------------------------
Telephone number formatting:
All telephone numbers must adhere to E.164 Standards - http://en.wikipedia.org/wiki/E.164

Inject the plugin into your handler, model, or service
/** Inject the Twilio Plugin */
property name="twilio" inject="coldbox:myPlugin:TwilioAPI";

Example plugin calls:

Place Call
rc.call = twilio.call(From="#getSetting('twilio').twilioTelephone#",To="+1XXXYYYZZZZ",URL=rc.postbackURL);

Send SMS
rc.sms = twilio.sms(From="#getSetting('twilio').twilioTelephone#",To="+1XXXYYYZZZZ",Body=rc.smsMessage);


** Note:  Additional methods contained within plugin.  Plugin does not contain methods to interact with all Twilio API enpoints, only partial.   Updates coming soon!
--------------------------------------------------------------------------------------
INSTALL INSTRUCTIONS
--------------------------------------------------------------------------------------

1.) Create a free Twilio Account - https://www.twilio.com/try-twilio

2.) Obtain your Twilio Account SID and Authorization Token

3.) Register and obtain a telephone number through Twilio

4.) Configure your Twilio settings in your ColdBox Config

// Twilio
twilio = {
    accountSID = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    authToken = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    apiVersion = "2010-04-01",
    apiURL = "https://api.twilio.com",
    apiReturnFormat = ".json", //.xml
    twilioTelephone = "1XXXYYYZZZZ"
}

5.) Drop the TwilioAPI.cfc plugin into your project plugin folder - {project root}/plugins
  •   Nolan Dubeau
  • Published
  • 1.0 is the latest of 1 release(s)
    Published
  • Published on {{ getFullDate("2016-06-09T01:19:54Z") }}

$ box install TwilioAPI

No collaborators yet.
 
5.00 / 2
  • {{ getFullDate("2011-04-28T15:45:18Z") }}
  • {{ getFullDate("2016-06-09T01:19:54Z") }}
  • 7,464
  • 5,917