-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
35 lines (23 loc) · 737 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
var unirest = require("unirest");
/*
HTTPS API Endpoint: https://secure.smslink.ro/sms/gateway/communicate/index.php
HTTP API Endpoint: http://www.smslink.ro/sms/gateway/communicate/index.php
*/
var req = unirest("GET", "https://secure.smslink.ro/sms/gateway/communicate/index.php");
/*
Get your SMSLink / SMS Gateway Connection ID and Password from
https://www.smslink.ro/get-api-key/
*/
req.query({
"to": "07xyzzzzzz",
"message": "My Test Message",
"connection_id": "... My SMS Gateway Connection ID ...",
"password": "... My SMS Gateway Connection Password ..."
});
req.headers({
"useQueryString": true
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});