flowroute-messaging-api

0.0.2 • Public • Published

Flowroute Messaging API

Simple API for communicating with the Flowroute Messaging service (both SMS & MMS).

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-messaging-api

Variables

Name Data Type / Format Required Description
from String('nnnnnnnnnnn') YES Sender DID in E.164 format
to String('nnnnnnnnnnn') YES Recipient DID in E.164 format
body String YES 160 ASCII characters or 70 extended ASCII characters
links [String] NO Array of URLs to hosted media items
callbackUrl String NO URL of server receiving ack messages
accessKey String('n*') YES Provided by Flowroute API Preferencess page.
secretKey String YES Provided by Flowroute API Preferencess page.

Example

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

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

flowroute.send(to, from, body, links, callbackUrl, accessKey, secretKey, (err, info) => {
  if (err) { throw err; }
  console.log(JSON.stringify(info, null, 2));
})

Successful Response

{
  "id": "mdr2-32889a4a82e011e78f288637582574e3"
}

Optional Variables

Two optional variables exist for the send method:

Variable Purpose
links Array of valid URLs pointing to hosted images, media files, or other attachments.
callbackUrl URL of a service endpoint listening for Flowroute's status callback.

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

Package Sidebar

Install

npm i flowroute-messaging-api

Weekly Downloads

1

Version

0.0.2

License

Apache-2.0

Unpacked Size

15.7 kB

Total Files

4

Last publish

Collaborators

  • fredlackey