Skip to content

FredLackey/flowroute-sms-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flowroute SMS API

Simple API for communicating with the Flowroute SMS API.

Other Projects

This project is only part of the entire Flowroute API. Other projects are:

Project Description
flowroute-sms-api SMS Messaging
flowroute-mms-api MMS Messaging
flowroute-messaging-api SMS & MMS Messaging

Installation

npm i --save flowroute-sms-api

Example Usage

const sms = require('flowroute-sms-api');
const params = require('./params.json');

const { from, to, body, callbackUrl, accessKey, secretKey } = params;

let id = '';
if (callbackUrl) {
  sms.send.withCallback(from, to, body, callbackUrl, accessKey, secretKey, (err, info) => {
    if (err) { throw err; }
    id = info.id;
  });
} else {
    sms.send.withoutCallback(from, to, body, accessKey, secretKey, (err, info) => {
    if (err) { throw err; }
    id = info.id;
  });
}

console.log(`Message ID: ${id}`);

Author Info

This project has been created for my personal use. It is maintained. Feel free to use it at your leisure. If you need help, either open an issue or get in touch directly:

Fred Lackey
fred.lackey@gmail.com
www.fredlackey.com

About

Simple API for communicating with the Flowroute SMS service.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published