FORGEBOX Enterprise 🚀 - Take your ColdFusion (CFML) Development to Modern Times! Learn More...

TwilioAPI

v1.0 Public
--------------------------------------------------------------------------------------
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

Here are all the versions for this package. Please note that you can leverage CommandBox package versioning to install any package you like. Please refer to our managing package version guide for more information.

Version Created Last Update Published By Stable Actions
Current
1.0 Apr 28 2011 03:45 PM Jun 09 2016 01:19 AM

 

  •   Nolan Dubeau
  • Published
  • 1.0 is the latest of 1 release(s)
    Published
  • Published on Jun 09 2016 01:19 AM
No collaborators yet.
 
5.00 / 2
  • Apr 28 2011 03:45 PM
  • Jun 09 2016 01:19 AM
  • 3418
  • 1855
  • 19