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 🙏

© 2026 – Pkg Stats / Ryan Hefner

sms-hubtel

v1.0.5

Published

An npm package for sending message, scheduling message and retrieving data of an existing message using the hubtel send message api

Readme

sms-hubtel

A nodejs module for hubtel send message APi

Features

  • [x] Sending Messages
  • [x] Scheduling Messages
  • [x] Rescheduling Messages
  • [x] Getting A Particular Message
  • [x] Getting All Messages
  • [x] Cancelling Scheduled Messages

Installation

npm i --save sms-hubtel

Usage

const hubtelSMS = require("sms-hubtel");
const SMS = hubtelSMS({
  clientid: "HubtelApplicationClientId",
  secretid: "HubtelApplicationSecreteId"
});

Send Message

SMS.sendSMS({
  From: "Sender", //Sender
  To: "+233509879941", //Receiver
  Content: "hello, world!",
  RegisteredDelivery: true
})
  .then(res => console.log(res))
  .catch(error => console.log(error));
Sample response
 {
"Status": 0,
"MessageId": "43cceb19d2a242f58fb338692e12c0bb",
"Rate": 0,
"NetworkId": "0"
}

NB: To send the message at a particular time (schedule) add Time to the request object Example is

 {
"From": "smsgh",
"To": "+233248183797",
"Content": "hello, world!",
"RegisteredDelivery": "true",
"Time": "2014-01-01 10:00:00"
}

Get message

SMS.getMessage("messageID").then(data => {
  console.log(data);
});

Sample Response

{
    "MessageId": "6f19395db2fb497ea4ebd1e218dd3e4c",
    "From": "Seinti",
    "To": "+233208183783",
    "Time": "2013-06-02 10:56:34",
    "UpdateTime": "2013-08-12 17:11:42",
    "NetworkId": "62001",
    "Units": 1,
    "Rate": 1,
    "Status": "Undeliverable",
    "Content": "hello, Kwadwo!"
}

Query message (Get all your messages)

SMS.queryMessage().then(data => {
  console.log(data);
});

Sample Response

{
  "TotalPages": 1,
  "Messages": [
    {
      "Rate": 0,
      "Units": 1,
      "MessageId": "4e60fb0b-a562-42bd-bf4a-22f1361c853d",
      "Content": "hello, world!",
      "Status": "Out of Credit",
      "NetworkId": "62002",
      "UpdateTime": "2018-10-06 02:43:05",
      "Time": "2018-10-06 02:43:05",
      "Direction": "out",
      "To": "+233509879941",
      "From": "Kwadwo"
    },
    {
      "Rate": 0,
      "Units": 1,
      "MessageId": "c1fc94c4-3c3e-4750-9176-966959d93620",
      "Content": "Hello John",
      "Status": "Out of Credit",
      "NetworkId": "62002",
      "UpdateTime": "2018-10-14 12:17:08",
      "Time": "2018-10-14 12:17:08",
      "Direction": "out",
      "To": "+233509879941",
      "From": "John"
    },
    {
      "Rate": 0,
      "Units": 1,
      "MessageId": "190cbcc7-8368-456c-a412-f5f754abcd71",
      "Content": "Hello John",
      "Status": "Out of Credit",
      "NetworkId": "62002",
      "UpdateTime": "2018-10-14 14:15:05",
      "Time": "2018-10-14 14:15:05",
      "Direction": "out",
      "To": "+233509879941",
      "From": "John"
    }
  ]}
  ,

NB:You can provide a query parameter

SMS.queryMessage({ limit: 10 }).then(data => {
  console.log(data);
});

Reschedule schedule message

SMS.rescheduleMessage(
  "MessageID",
  "2013-08-12 17:11:42" // Time
).then(data => {
  console.log(data);
});

Cancel schedule message

SMS.cancelMessage("MessageID").then(data => {
  console.log(data);
});

Test

npm run test

Please visit https://developers.hubtel.com for more information

Happy Coding