-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.js
35 lines (26 loc) · 758 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 request = require("request");
/*
Get your SMSLink / SMS Gateway Connection ID and Password from
https://www.smslink.ro/get-api-key/
*/
/*
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 options = {
method: 'GET',
url: 'https://secure.smslink.ro/sms/gateway/communicate/index.php',
qs: {
to: '07xyzzzzzz',
message: 'My Test Message',
connection_id: '... My SMS Gateway Connection ID ...',
password: '... My SMS Gateway Password ...'
},
headers: {
useQueryString: true
}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});