textng

1.0.0 • Public • Published

Textng Node.js Library


The Textng Node library provides convenient access to the Textng API from applications written in server-side JavaScript.


Documentation

See the Textng API docs.Written in PHP Language

Requirements

Node 8, 10 or higher.

Installation

Install the package with:

npm install textng --save
# or
yarn add textng

Usage

The package needs to be configured with your account's secret key.This could be found at the bottom of your Account Profile page. The key authorizes the transaction.

const textng = new Textng({
  key: "xxxxxxxxx",
  sender:"yyyyyyyyy"
})

textng.sendSMS({
  phone: "0800000000",
  message:"hello world"
})
  .then(textng => console.log(textng))
  .catch(error => console.error(error));

Or using ES modules and async/await:

import Textng from 'textng';
const textng = new Textng({
  key: "xxxxxxxxx",
  sender:"yyyyyyyyy"
})

(async () => {
  const textng = await textng.sendSMS({
    email: "0800000000",
     message:"hello world"
  });

  console.log(textng);
})();

Readme

Keywords

none

Package Sidebar

Install

npm i textng

Weekly Downloads

0

Version

1.0.0

License

ISC

Unpacked Size

2.76 kB

Total Files

3

Last publish

Collaborators

  • textngcomms