New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

bulksms-service

Package Overview
Dependencies
Maintainers
0
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bulksms-service

Bulk SMS Service For NodeJS

  • 1.0.5
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-33.33%
Maintainers
0
Weekly downloads
 
Created
Source

bulksms-service

bulksms-service is a JavaScript library for sending Bulk SMS.

The bulksms-service package contains only the functionality necessary to send SMS components. It is typically used together with NodeJS applications.

Note: bulksms-service Bulk SMS Service is not a free of cost service. Register and Get the access credentials from your provide.

Usage

const bulksmsService = require('bulksms-service');


// Creating Bulk SMS Service Client
let bulkSMSServiceClient = bulksmsService.client({
    username    : "USERNAME",
    accessKey   : "ACCESS_KEY",
    endPoint    : "https://example.com"
});

bulkSMSServiceClient.sendSMS({
    header      : "HEADER", //Required
    route       : "ROUTE",  //Required
    message     : "Hey, Good Morning.", //Required
    recipients  : ["9194XXX XXXXX","9195XXX XXXXX","9196XXXXXXXX","97XXXXXXXX"], //Required
    entityId    : "XXXXXXXXXXXXXXXXXXX", //Optional
    templateId  : "XXXXXXXXXXXXXXXXXXX"  //Optional
})
.then(function(data) {
    //Success or, Partial success 
    console.log(data);
})
.catch(function(err) {
    //Failed
    console.log(err);
});

API Documentation

bulksmsService.client(params)

Creates and returns Alertin client object.

params:

  • username - required, Username of your Alertin panel.
  • accessKey - required, Generated Access Key from Alertin panel.
  • endPoint - required, End Point of your Provider(domain).

bulksmsService.sendSMS(params)

Sending SMS to Recipients and returns Promise. If the promise is success You will get messageid from Response data.

params:

  • header - required, SMS Header.
  • route - required, Route you want to send SMS.
    • Promotional – A
    • Transaction – T
    • SID – SID
    • Promo SID(DND) – PD
    • International – I
  • message - required, Message Content.
  • recipients - required, Phonenumber(s) of SMS Receivers. phonenumber, or array of phonenumbers

entityId, templateId - These are Optional fields if you have added Your EntityId, TemplateId on Alertin Panel

  • entityId - optional, DLT Registered Entity ID.
  • templateId - optional, DLT Registered Template ID.

Note: entityId and templateId are optional fields, but if you are able to parse the values, that will reduce the response time.

Sample Response

    {
        status: 200,
        description: 'Partial success',
        data: [
            { 
                recipient   : '9194XXX XXXXX',
                messageid   : null,
                status      : 'Invalid Header'
            },
            {
                recipient: '9195XXX XXXXX',
                messageid: '232XXXXX',
                status: 'Success'
            },
            ...
        ]
    }

Keywords

FAQs

Package last updated on 01 Oct 2024

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc