--------------------------------------------------------------------------------------
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
  • 1.0 is the latest of 1 release(s)
    Published
  • Published on Jun 09 2016 01:19 AM
$ box install TwilioAPI
5.00 / 2
  • Apr 28 2011 03:45 PM
  • Jun 09 2016 01:19 AM
  • 2617
  • 1000
  • 11