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

jambopay-sms

v0.1.2

Published

An SDK to aid in JamboPay SMS gateway integration

Readme

JAMBOPAY SMS SDK FOR NODEJS

This is the unofficial node.js sdk for integration with the Jambopay SMS gateway

All of the methods called return promises and can therefore be easily chained

INSTALLATION

npm i jambopay-sms

1. GETTING STARTED

 Object.assign( global, { JP_SMS: require('jambopay-sms')});

The above makes the {jambopay-sms} module globally available as 'JP_SMS' in your project

1b. SENDER INSTANTIATION ( new JP_SMS('YOUR SENDER ID', 'YOUR DEFAULT COUNTRY CODE') )

const JAMBO_KENYA = new JP_SMS('KENYA','254');

You may instantiate as many sender objects as you require


2. SET THE ENDPOINT URL (.set_endpoint_url(remote_host_address))

( Not necessary if using the default one i.e https://sms.jambopay.co.ke )

Example:

 JAMBO_KENYA.set_endpoint_url( 'https://sms.jambopay.co.ke' );

3. LOGIN (.login(username,password))

Example:

JAMBO_KENYA
.login(
    '[email protected]',
    'your_s3cu^34ccessP455w0RD'
)
.then(d => 
{
    
    //@ All subsequent operations are placed here  
    //e.g new instantiation that will inherit login state

    const JAMBO_AFRICA = new JP_SMS("AFRICA","001");

})
.catch(e => {

    //@ Handle the error 

})

This only needs to be done once regardless of the number of instantiations - all other instantiations will benefit from this login

This module handles basic authentication re-negotiation with the SMS gateway so that you don't have to. This fetches an authentication token for use with each request.

USER METHODS

A. SINGLE SMS (.sendOne)

JAMBO_KENYA
.sendOne(  
     'RECIPIENT_NUMBER',
     'MESSAGE TO RECIPIENT'
)
.then(d=>console.dir(d.data))
.catch(console.error)

Upon successful queueing, you will receive a confirmation email (upon completion) and a refund in the case of a failed SMS message


B. MULTIPLE SMS (.sendMany)

JAMBO_KENYA
.sendMany(  
    [
        ['RECIPIENT_NUMBER','MESSAGE TO RECIPIENT'],
        ['RECIPIENT_NUMBER','MESSAGE TO RECIPIENT'],
        ...
    ]
)
.then(d=>console.dir(d.data))
.catch(console.error)

Upon successful queueing, you will receive a confirmation email (upon completion) and all applicable refunds for failed SMS messages


C. SCHEDULED SMS

To effect this, pass an extra object in the format {start:Date,end:Date} to the single or multiple methods as shown below

1. SINGLE SCHEDULED SMS

JAMBO_KENYA
.sendOne(  
     'RECIPIENT_NUMBER',
     'MESSAGE TO RECIPIENT',
     { start: new Date('2019-06-13T15:10')}
)
.then(d=>console.dir(d.data))
.catch(console.error)

2. MULTIPLE SCHEDULED SMS

JAMBO_KENYA
.sendMany(  
    [
        ['RECIPIENT_NUMBER','MESSAGE TO RECIPIENT'],
        ['RECIPIENT_NUMBER','MESSAGE TO RECIPIENT'],
        ...
    ],
    { start: new Date('2019-06-13T15:10')}
)
.then(d=>console.dir(d.data))
.catch(console.error)

An 'end' parameter can be passed (where necessary). If one is not passed, a two hour period from the 'start' will be effected.

Please note that if any message in the batch fails, retries will be made until either it's effective 'end' or the system maximum number of retries is reached.

A sending summary email will only be sent if either all messages were successfully sent or the defined 'end' of the schedule period has reached.


D. GET USER BALANCE (.getBalance)

JAMBO_KENYA
.getBalance(   )
.then(d=>console.dir(d.data))
.catch(console.error)

This will return all the relevant balances for the loged in user.


E. USER PROFILE (.getProfile)

JAMBO_KENYA
.getProfile(   )
.then(d=>console.dir(d.data))
.catch(console.error)

This will return the loged in user's profile.

F. PASSWORD RECOVERY (.recoverPassword)

JAMBO_KENYA
.recoverPassword('USER EMAIL ADDRESS')
.then(d=>console.dir(d.data))
.catch(console.error)

This will send a one time password recovery link to the user-provided email address (provided that an active account is linked to it).