0.1.2 • Published 10 years ago

mbu-twilio v0.1.2

Weekly downloads
-
License
-
Repository
github
Last release
10 years ago

mbu-twilio

Twilio convenience module.

Configuration

Create a configuration json file:

{
    "sid":"ACCOUNT_SID",
    "authToken":"AUTH_TOKEN",
    "sender":"+15555555555",
    "voice":"female"
}

Usage

1) Add a require statement to your application:

var MBUTwilio = require('mbu-twilio');

2) Instantiate a new mbuTwilio object from the MBUTwilio module passing in the config json file path:

var twilio = new MBUTwilio(__dirname + "/config.json");

3) Send a text message by calling:

twilio.sendTextMessage('(555) 555-5555', '<text message body>', function (error, data
    // DO SOMETHING
});

4) Send a phone call by calling:

twilio.sendPhoneCall('(555) 555-5555', '<MESSAGE BODY>', '<MESSAGE URL>', function (error, data
    // DO SOMETHING
});
0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago