Skip to content

gwuah/hubtel-sms-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hubtel-sms-node

A node wrapper around hubtel sms api. [WIP]

Installation

yarn add hubtel-sms-node

Usage

Sending message using hubtel

const hubtel = require('hubtel-sms-node')({
  clientId: 'your key here',
  clientSecret:  'your secret here'
});

let payload = {
  from: "Sample Message",
  to: '2330244161819',
  registeredDelivery: true,
  message: 'Yo, this should work.. hehe'
}

hubtel.sendSMS(payload).then((response) => {
 /* play with response */
}).catch(error => {
  /* handle errors here */
})

Todo

  • Update docs to include type of response recieved after making request.
  • Check status of messages sent (add new method)
  • Add a 5 second break between requests to make sure we are following api rules.
  • Sanitize and encode input
  • Write tests for library
  • Use a seperate method to build url

About

A nodejs wrapper for hubtel's sms api.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published