node-nexmo
A node.js library for accessing the Nexmo REST API.
Usage
var nexmo = require('nexmo')({key: 'key', secret: 'secret'});
var message = nexmo.sms({to: 'to', from: 'from', text: 'Welcome to Nexmo from Node!'});
message.send(function(err, results) {
if (!err) {
console.log('Your message was delivered in ' + results['message-count'] + ' part(s)!');
}
});
nexmo.account.balance(function(err, balance) {
if (!err) {
console.log('Your account balance is: ' + balance);
}
});
nexmo.receipts.on('failed', function(msg) {
console.log('Message to ' + msg.to + ' failed!');
nexmo.receipts.stop();
}
nexmo.receipts.start();
Install
npm install nexmo
Dependencies
This library depends on: