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


v1.1.0+25 Public

Build Status


This module is a CFML SDK to interact with the Twilio API


Apache License, Version 2.0.




  • Lucee 4.5+
  • Adobe ColdFusion 11+


Configure your Twilio credentials in the config/ColdBox.cfc file.

moduleSettings = {
    "twilio-sdk" = {
        accountSID = "",
        authToken = ""



Look up information about a phone number. Returns a configured HyperRequest instance.

phoneNumberStringtrueThe phone number to look up
withCallerNameBooleanfalsefalseShould caller information be included in the response. (This costs extra.)
addonsArrayfalse[]An optional array of addons to process and include in the response. (This may cost extra.)


Send an sms message. Returns a configured HyperRequest instance.

toStringtrueThe phone number the sms is going to.
fromStringtrueThe phone number the sms is from. This must be a valid Twilio number.
bodyStringtrueThe body of the sms message.

Hyper Integration

The Twilio SDK uses the Hyper HTTP Client under the hood. This entire power is exposed to you.

All methods on the Twilio SDK return a HyperRequest instance. This instance can be immediately executed by calling send, or it can be configured further.

The following is an example of creating an SMS message but then overriding the default URL to allow for subaccount billing.

var req = twilioClient
  .sms( from = "+15005550006", to = "+18015550005", body = "Testing 123" )
  .setUrl( "/Accounts/#subAccountSID#/Messages.json" )

Additionally, you may call any HyperRequest method on the TwilioSDK and a new request will be created, your method called, and the result returned to you.

Hyper is so powerful in this case because it can be pre-configured with common values. This is done for your in the ModuleConfig.cfc: "[email protected]" )
    .to( "hyper.models.HyperBuilder" )
        username = settings.accountSID,
        password = settings.authToken,
        baseURL = "",
        bodyFormat = "formFields",
        headers = {
            "Content-Type" = "application/x-www-form-urlencoded"

Because of Hyper, you don't have to specify those parameters every request. ?

Non-ColdBox App

In a non-ColdBox application, you'll need to initialize the models and settings yourself, like so:

var hyperClient = new Hyper.models.HyperBuilder(
    username = accountSID,
    password = authToken,
    baseURL = "",
    bodyFormat = "formFields",
    headers = {
        "Content-Type" = "application/x-www-form-urlencoded"

// store in some sort of singleton scope
application.twilioClient = new twilio-sdk.models.TwilioClient();
application.twilioClient.setAccountSID( accountSID );
application.twilioClient.setHyperClient( hyperClient );

// use as normal
var lookupInfo = application.twilioClient.lookupPhoneNumber( "415-701-2311" );
Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp | |


Because of His grace, this project exists. If you don't like this, then don't read it, its not for you.

"Therefore being justified by faith, we have peace with God through our Lord Jesus Christ: By whom also we have access by faith into this grace wherein we stand, and rejoice in hope of the glory of God. And not only so, but we glory in tribulations also: knowing that tribulation worketh patience; And patience, experience; and experience, hope: And hope maketh not ashamed; because the love of God is shed abroad in our hearts by the Holy Ghost which is given unto us. ." Romans 5:5


"I am the way, and the truth, and the life; no one comes to the Father, but by me (JESUS)" Jn 14:1-12



  • Initial Release

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
1.1.0+25 Mar 28 2018 05:27 PM Mar 28 2018 05:27 PM
Version History
1.1.0-snapshot Mar 28 2018 05:24 PM Mar 28 2018 05:24 PM
1.0.0+22 Mar 28 2018 12:56 PM Mar 28 2018 12:56 PM
1.0.0+21 Dec 13 2017 01:46 PM Dec 13 2017 01:46 PM
1.0.0+20 Dec 12 2017 10:26 AM Dec 12 2017 10:26 AM
1.0.0+19 Dec 05 2017 02:35 PM Dec 05 2017 02:35 PM
1.0.0+18 Dec 04 2017 10:40 PM Dec 04 2017 10:40 PM
1.0.0-snapshot Dec 04 2017 10:34 PM Dec 04 2017 10:34 PM
0.0.0 Dec 04 2017 10:26 PM Dec 04 2017 10:26 PM


No collaborators yet.
  • Dec 04 2017 10:26 PM
  • Mar 28 2018 05:27 PM
  • 770
  • 1,515
  • 556