npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@saralsms/sdk-for-node

v1.0.4

Published

SaralSMS SDK for the JavaScript and Node.js applications.

Downloads

6

Readme

SaralSMS SDK for Node.js

Package Downloads License

The SaralSMS SDK for Node.js makes it easy for developers to access SaralSMS API service in their Node.js applications, and build robust SMS based applications and software.

Getting Started

  1. Sign up for SaralSMS – Before you begin, you need to sign up for an SaralSMS account and retrieve your Credentials.
  2. Minimum requirements – To run the SDK, your system will need to meet the minimum requirements, including having Node.js >= 8.0.

Installation

Install the SDK – Using npm or Yarn is the recommended way to install the SaralSMS SDK for Node.js. The SDK is available via npm under the @saralsms/sdk-for-node package.

// npm
npm install @saralsms/sdk-for-node
// yarn
yarn add @saralsms/sdk-for-node

Getting Help

We use the GitHub issues for tracking bugs and feature requests and address them as quickly as possible.

Quick Examples

Create a SaralSMS client

import SaralSms from '@saralsms/sdk-for-node';
// instantiate a SaralSMS client.
const saral = new SaralSms('f9c6......55c1');

where f9c6......55c1 is the authentication token.

Send Message

This will send the message to one or multiple numbers in an array.

saral
  .sendSms(['9851xxx123', '9801xxx456'], 'This is test message from API.')
  .then((res) => {
    // success
    console.log(res);
  })
  .catch((error) => {
    // error
    console.log(error);
  });

Sample Response

{
    "message": "2 messages queued for delivery."
}

Credits

This will return the available credits and total messages sent.

saral
  .getCredits()
  .then((res) => {
    // success
    console.log(res);
  })
  .catch((error) => {
    // error
    console.log(error);
  });

Sample Response

{
  "credits": 6584,
  "total_sent": 3416
}

Reports

This will return historical messages reports including networks, charges and status.

const pageNumber = 1;
saral
  .getReports(pageNumber)
  .then((res) => {
    // success
    console.log(res);
  })
  .catch((error) => {
    // error
    console.log(error);
  });

Sample Response

{
  "pages": 126,
  "data": [
    {
      "id": 56480058,
      "receiver": "9779851xxx123",
      "network": "ntc",
      "message": "Fruits are an excellent source of essential vitamins and minerals.",
      "api_credit": "1",
      "delivery_at": "2020-07-09 01:45:09"
    },
    {
      "id": 56480057,
      "receiver": "9779801xxx456",
      "network": "ncell",
      "message": "Vegetables are important sources of many nutrients, including potassium, dietary fiber.",
      "api_credit": "1",
      "delivery_at": "2020-07-08 07:25:31"
    }
  ]
}