clockworksms

0.1.0-rc1 • Public • Published

Clockworksms

Clockworksms API wrapper

Usage

Simple example

var options = {
  to: '61431214130',
  msg: 'equal bytes for everyone'
}

var clockworksms = require('clockworksms');
var client = clockworksms.createClient('234f97233772fe5cea7cfe14537djki98c03aiwed88w');

client.send(options, function(response) {
  if (response instanceof Error) {
  // not good :)
  console.log(response.code, response.message);
  } else {
  // all good, cheers :D
  console.log(response.messageIds);
  }
});

The options argument has the following options:

  • to: (String|Array of Strings) - required - Up to 50 phone numbers. Each number should start with an international country code without any leading zeros or plus symbols.
  • msg: (String) - required - The message you want to send.
  • from: (String) - optional - The text or phone number displayed when a text message is received on a phone. Look at the API documentation for further information.
  • long: (Boolean) - optional - Set this to true and it will stick together multiple messages giving you up to 459 characters, rather than the standard 160

For full info please check SEND SMS VIA HTTP documentation

Development

Feel free to contribute, suggest improvements, etc. Note: I usually don't program in node or any kind of javascript language, so just a warning :)

Licence

See LICENSE file

Readme

Keywords

Package Sidebar

Install

npm i clockworksms

Weekly Downloads

1

Version

0.1.0-rc1

License

none

Last publish

Collaborators

  • golja