0.0.1 • Published 5 years ago

flowroute-mms-api v0.0.1

Weekly downloads
4
License
Apache-2.0
Repository
github
Last release
5 years ago

Flowroute MMS API

Simple API for communicating with the Flowroute MMS API.

Other Projects

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

ProjectDescription
flowroute-sms-apiSMS Messaging
flowroute-mms-apiMMS Messaging
flowroute-messaging-apiSMS & MMS Messaging

Installation

npm i --save flowroute-mms-api

Example Usage

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

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

let id = '';
if (callbackUrl) {
  mms.send.withCallback(from, to, body, mediaLinks, callbackUrl, accessKey, secretKey, (err, info) => {
    if (err) { throw err; }
    id = info.id;
  });
} else {
    mms.send.withoutCallback(from, to, body, mediaLinks, 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