1.0.4 • Published 8 years ago

node-semaphore-sms v1.0.4

Weekly downloads
79
License
-
Repository
github
Last release
8 years ago

node-semaphore-sms

Semaphore SMS API Client for NodeJS. Semaphore is The Simplest Web to SMS API ever. To find out more and subscribe to their service, visit their homepage.

This SMS service is only available to mobile numbers from the Philippines.

Installation

npm install node-semaphore-sms

You also need to change the file config.json.sample to config.json.

You also need to provide your API KEY from Semaphore.

Usage

var Semaphore = require('node-semaphore-sms');

var apikey = "YOUR_API_KEY";
var sms = new Semaphore(apikey);

// To check your account status:
sms.status(function(error, result) {
	if (!error)
		console.log(result);
});	

// To send a single SMS message:
var payload = {
	from: 'SEMAPHORE',
	to: '09179008888',
	message: 'Semaphore API Rocks!'
};
sms.sendsms(payload, function(error, result) {
	if (!error) {
		console.log(result);
	} else
		console.log(error);
});    

// To send SMS to bulk numbers:
var bulk_numbers = "09179008888,09168769988";
sms.bulksms(bulk_numbers, function(error, result) {
	if (!error) {
		console.log(result);
	} else
		console.log(error);
});

License

MIT

Release History

  • 1.0.0 - Initial release
  • 1.0.3 - Minor refactoring
1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago