Skip to content

BorisKotlyarov/mobizonNetUa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mobizon-net-ua

node.js client for sending SMS via the service Mobizon.net.ua

##Install

npm install mobizon-net-ua

##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: '' 
            } 
        */
    });

About

node.js client for sending SMS via the service Mobizon.net.ua

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published