README
smsru-promise
Nodejs module for API of sms.ru with Promises
The full API documentation(on Russian only) – http://sms.ru/?panel=api
Usage
const SMS = require('smsru-promise');
Authorization (with api_id):
const sms = new SMS({apiID: "YOUR_SECRET_APP_ID"});
Authorization (with a login/password pair):
let sms = new SMSru({
login: 'YOUR_LOGIN',
password: 'YOUR_PASSWORD'
});
Send SMS:
sms.send({
to: 'PHONE_NUMBER',
text: 'text'
}).then(res=> {
//process
}).catch(err=> {
//process
});
Check status of sent SMS:
sms.status({
ids: 'SMS_ID'
}).then(res=> {
//process
});
Check cost of SMS:
sms.cost({
to: 'PHONE_NUMBER',
text: 'text'
}).then(res=> {
//process
})
License (ISC)
See the License file for details