trailpack-twilio
Twilio Trailpack for sending SMS
Install
With yo :
$ yo trails:trailpack trailpack-twilio
With npm
$ npm install --save trailpack-twilio
Configure
Add you trailpack to Trails :
// config/main.jsmoduleexports = packs: // ... other trailpacks
Add configuration for twilio :
// config/twilio.jsmoduleexports = /** * The "account sid" associated with your Twilio account. */ accountSid: null /** * The "auth token" associated with your Twilio account. */ authToken: null /** * This is the 'From' phone number you'd like to use to send the SMS. */ from: null
Usage
Use the TwilioService
like this (from controllers/policies/services) :
//Send basic SMSthisappservicesTwilioService //Send basic SMS with media URLthisappservicesTwilioService
Contributing
We love contributions! Please check out our Contributor's Guide for more information on how our projects are organized and how to get started.