budgetsms-node

0.0.2 • Public • Published

budgetSMS-node

A wrapper for budgetSMS for use with NodeJS.

Setup

npm i budgetsms-node

How to use

Initialize

const BudgetSMS = new BudgetSMSAPI({
    username: process.env.BUDGET_SMS_USERNAME,
    userid: process.env.BUDGET_SMS_USER_ID,
    handle: process.env.BUDGET_SMS_HANDLE
})

Send SMS

BudgetSMS.from('InfoSMS')
  .to('123456789')
  .message('Hello world')
  .send()
  .then(json => console.log(json))
  .catch(error => console.error(error))

For testing your solution use test instead

BudgetSMS.from('InfoSMS')
  .to('123456789')
  .message('Hello world')
  .test()
  .then(json => console.log(json))
  .catch(error => console.error(error))

Error codes

You can use this page for the meaning of the various error codes.

Readme

Keywords

none

Package Sidebar

Install

npm i budgetsms-node

Weekly Downloads

2

Version

0.0.2

License

MIT

Unpacked Size

3.88 kB

Total Files

4

Last publish

Collaborators

  • pitops