trueafricansms
v1.0.4
Published
trueafrican sms, for Uganda, portal URL - https://mysms.trueafrican.com/
Downloads
6
Maintainers
Readme
True African SMS Gateway API for Uganda
Install
npm install trueafricansms --save
Test
npm test
Basic Usage
//import library
const trueafrican = require('trueafricansms');
//get data from database or ...
const Username = 'xxxx'; // true african client username
const Password = 'xxxx'; // true african client password
const PhoneNumber = '256xxxxxxxxx'; // to mobile number or msisdn number
const Message = 'npm test super agent'; // sms text message
const obj = {
username: Username,
password: Password,
msisdn: PhoneNumber,
message: Message
};
//send sms
new Promise((resolve, reject) => {
trueafrican(obj)
.then(res => {
//console.log('success: ',res);
resolve(true);
})
.catch(err => {
console.log('error: ', err);
reject(err);
});
});
Expected ouput
{
response: 'json response from true african end'
}