ts-smsc
v1.0.6
Published
Library smsc.ru for node.js
Downloads
56
Maintainers
Readme
Documentations
https://webigorkiev.github.io/ts-smsc/
Installation
npm i ts-smsc
Usage
import {smsc} from "ts-smsc";
const sender = smsc({
// smsc.ConfigureOptions
login: SMSC_LOGIN,
password: SMSC_PASSWORD
});
// Send sms
sender.send({
phones: "+38093100xxxx",
mes: "Test text"
});
// Or send call code
sender.send({
phones: "+38093100xxxx",
mes: "Test text",
call: 1
});
Async Usage
import {smsc} from "ts-smsc";
const sender = smsc({
// smsc.ConfigureOptions
login: SMSC_LOGIN,
password: SMSC_PASSWORD
});
(async() => {
// Send call code
const {data, err, code} = await sender.send({
phones: "+38093100xxxx",
mes: "code",
call: 1
});
})();
Source
https://smsc.ru/api/