mobizon-net-ua
v1.0.0
Published
node.js client for sending SMS via the service Mobizon.net.ua
Downloads
2
Readme
mobizon-net-ua
node.js client for sending SMS via the service Mobizon.net.ua
About Mobizon service: UA | EN Mobizon api documentation
##Examples
###Send sms
const Mobizon = require('mobizon-net-ua');
const smsGate = new Mobizon({token: 'YOUR_API_TOKEN'});
smsGate.sendSms('+380671234567', 'Very cool sms')
.then(response => {
console.log(response);
/* => response
{
code: 0,
data: {
campaignId: '1759377',
status: 1,
messageId: '12111324'
},
message: ''
}
*/
});
###Get sms status
const Mobizon = require('mobizon-net-ua');
const smsGate = new Mobizon({token: 'YOUR_API_TOKEN'});
smsGate.getSmsStatus('12111324')
.then(response => {
console.log(response);
/* => response
{
code: 0,
data: [
{ id: '12111324', status: 'DELIVRD', segNum: '1' }
],
message: ''
}
*/
});
###Get balance
const Mobizon = require('mobizon-net-ua');
const smsGate = new Mobizon({token: 'YOUR_API_TOKEN'});
smsGate.getSmsBalance()
.then(response => {
console.log(response);
/* =>
{
code: 0,
data: { balance: '190.4280', currency: 'UAH' },
message: ''
}
*/
});