Skip to content

name-am/nikita-sms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nikita Sms

npm npm

Installation

Installation is done using the npm install command:

npm install nikita-sms
# or
yarn add nikita-sms

Usage

const NikitaSms = require('nikita-sms');

// Creates a new user with username and password
const user = new NikitaSms('username', 'password');

const recipient = '+37477918700'; //recipient number
const text = 'sms body text'; // sms text
const id = recipient.substring(1) + +new Date(); //sms id (number + timestamp)
const priority = '8'; //sms priority (optional) defalut: 8

user.sendSms(recipient, text, id).then((data) => {
  console.log(data); // ⇨ 'OK'
});

user.getStatusSms(id).then((data) => {
  console.log(data); // ⇨ {
  //   messages: [
  //     {
  //       'message-id': '374779187001605872849862',
  //       channel: 'SMS',
  //       status: 'Delivered',
  //       'status-date': '2020-11-20 15:47:33',
  //       description: ' '
  //     }
  //   ]
  // }
});

sms text

License

MIT

About

Node.js module for Nikita mobile SMS gateway

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published