To start working just set up your ID and KEY
var bytehand = require("./bytehand")({id: 'YOUR ID', key: 'YOUR KEY'});
Try to send sms to your friend
bytehand.send({
to: '+79217771234',
from: 'YANDEX',
text: '?¡Hola! ¿Cómo te va todo?'
}, function(error, response){
if( ! error )
console.log(response.messageId);
});
Check message status
bytehand.status('123456789', function(error, status){
if( err ) return console.log(error);
console.log('status: ', status);
});
Before sending any message you might want check your credit
bytehand.balance(function(error, balance){
if( err ) return console.log(error);
console.log('balance: ', balance);
});
You can use https
by adding secure
property to your config
var bytehand = require("./bytehand")({
id: 'YOUR ID',
key: 'YOUR KEY'
sucure: true
});
But you might see something like UNABLE_TO_VERIFY_LEAF_SIGNATURE