notification-services
Version:
Use email, sms and custom notification services for node.js application easily
32 lines (31 loc) • 958 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.gupshupSend = void 0;
const axios_1 = __importDefault(require("axios"));
const gupshupSend = (options, callback) => {
const opt = {
userid: options.userId,
password: options.password,
send_to: options.to,
method: 'SendMessage',
msg: options.message,
msg_type: 'Text',
auth_scheme: 'Plain',
v: '1.1',
format: 'text',
mask: options.mask
};
(0, axios_1.default)({
method: "get",
url: `http://enterprise.smsgupshup.com/GatewayAPI/rest`,
params: opt,
}).then((response) => {
console.log("otp responses");
console.log(response.data);
}).catch(error => {
});
};
exports.gupshupSend = gupshupSend;