This package has been deprecated

Author message:

cm-messaging-node moved to @cmdotcom/text-sdk

cm-messaging-node
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

cm-messaging-node: A helper library to send text messages.

NPM

Build Status Codacy Badge codecov

Want to send text-messages in your Node.js application? Then you are at the right place.

The package is currently limited in features compared to the CM gateway, but if you want to get all the functionalities, go to: CM.com API Docs

Usage

Node.JS

First, run npm install cm-messaging-node. Then, in your source file:

const messagingApi = require("cm-messaging-node");
 
// Get your product token at CM.com.
const yourProductToken = "";
const myMessageApi = new messagingApi.MessageApiClient(yourProductToken);
 
const result = myMessageApi.SendTextMessage("00316012345678", "TestSender", "Hello world?!");
 
result.then((result) => {
    console.log(result);
}).catch((error) => {
    console.log(error);
});

or send multiple with SendTextMessages:

const result = myMessageApi.SendTextMessages(["00316012345678","003160000000"], "TestSender", "Hello world?!");

License

cm-messaging-node is under the MIT license. See LICENSE file.

Package Sidebar

Install

npm i cm-messaging-node

Weekly Downloads

0

Version

1.1.0

License

MIT

Unpacked Size

47.7 kB

Total Files

13

Last publish

Collaborators

  • smekkie