0.0.2 • Published 5 years ago
budgetsms-node v0.0.2
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.