fortysix-elks

A wrapper for the 46elks (http://46elks.com) API. At the moment only sms functions are supported

npm install fortysix-elks
3 downloads in the last week
12 downloads in the last month

fortysix-elks

A simple wrapper for the 46elks (http://46elks.com) API. At the moment only sms functions are supported.

Install

npm install fortysix-elks

Usage

Set up the Client

Require the fortysix-elks module and initalize a new client using your 46elks credentials. If the environment variables FORTYSIXELKS_USERNAME and FORTYSIXELKS_PASSWORD are set these two parameters can be omitted.

var fortysixElks = require('fortysix-elks');
var fc = new fortysixElks.Client('46elks username', '46elks password');

Send an SMS

Please check the code comments for details of this functions parameters and the values passed to the callback.

fc.sendSMS('Sender', '+4670****085', 'Hello!', function(err, res) {
  console.log(err);
  console.log(res);
});

Changelog

0.0.3 (2013-09-19)

  • The sendSMS() callback now receives a parsed version of the data that is returned by the 46elks API. Please see the comments in the code or the tests for an explanation of this data.
  • Error messages from the 46elks API is now passed as a part of the Error object's message.
  • Support for text message delivery reports.

0.0.2 (2013-09-18)

  • It is now possible to send text messages to multiple recipients.

0.0.1 (2013-09-18)

  • Initial release.

TODO

  • Support for phone number allocation.

  • Support for phone number modification and deallocation.

npm loves you