Socket
Socket
Sign inDemoInstall

@adetoola/sms

Package Overview
Dependencies
7
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @adetoola/sms

SMS is a succinct and flexible way to add Nigerian SMS providers integration to nodejs apps.


Version published
Weekly downloads
3
increased by50%
Maintainers
1
Install size
8.97 MB
Created
Weekly downloads
 

Readme

Source

SMS

SMS is a succinct and flexible way to add Nigerian SMS providers integration to nodejs apps.

Contents

  • Installation
  • Configuration
  • Usage
  • Contributing
  • Security
  • Credits
  • License

Installation

Getting started with SMS is quite easy, just install using your favourite package manager.

Using Yarn
 yarn add @adetoola/sms
Using NPM
 npm install @adetoola/sms

Available SMS Gateway

You can specify any of the supported sms gateway from the list below:

  • Test (Use as a test account)
  • SMS247Live
  • XWireless
  • 50Kobo
  • SMSTube
import SMS from '@adetoola/SMS';

const sms = new SMS('SMSLive247');

SMS Gateway Credentials

Each SMS service provider will give authorised users a set of credentials to use when sending SMS or interacting with their services.

# Test
SMS_SENDER='YOUR_SENDER_NAME_HERE'

# SMS247Live
SMS_SENDER='YOUR_SENDER_NAME_HERE'
SMS_SESSION_ID='YOUR_SESSION_ID_HERE'

Usage

Using SMS is quite simple.

const sms = new SMS('SMSLive247');
sms.sender(sender).country(country).credentials(credentials);

const messageId = sms.send('08123456789', 'NG', 'Hi, I am using Adetoola SMS package');

console.log(messageId);

Methods

MethodSMS247LIVE
SMS::send(recipient, msg [, msg_type])+
SMS::schedule(recipient, msg, datetime[, msg_type])+
SMS::balance()+
SMS::charge(msg_id)+
SMS::status(msg_id)+
SMS::coverage(recipient)+
SMS::stop(msg_id)+
SMS::history()+

Valid Formats

InputDescriptionAccepted Formats
recipientComma separated numbers, number or array+2348012345678, 2348012345678, 8012345678, 0812345678
country"Country" is a two-letter ISO country code (like NG)[AZ]{2}
msgText message which will be sent to the numbers.[a-zA-Z0-9+_-."'\s]{1,160}
senderNumber to display as sender[a-zA-Z0-9_-]{1,11}
msg_typeNormal SMS, Flash or MMSTEXT, FLASH, MMS
datetimeDatetime in format Y-m-d H:i:s.2016-03-16 22:40:34
msg_idMessage ID, provider by gateway[a-zA-Z0-9]

Example

#coming soon!

Change log

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING and CONDUCT for details.

Security

If you discover any security related issues, please email adetola.onasanya@gmail.com instead of using the issue tracker.

Credits

License

SMS is an open-sourced package licensed under the MIT license.

Keywords

FAQs

Last updated on 08 Jun 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc