A node.js library for accessing the Nexmo REST API
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
test
.gitignore
README.md
index.js
package.json

README.md

node-nexmo

A node.js library for accessing the Nexmo REST API.

Usage

var nexmo = require('nexmo')({key: 'key', secret: 'secret'});

// Send an SMS message

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)!');
  }
});

// Check your account balance

nexmo.account.balance(function(err, balance) {
  if (!err) {
    console.log('Your account balance is: ' + balance);
  }
});

// ... or spin up an http server and emit message receipts

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: