-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcode.gs
More file actions
26 lines (24 loc) · 784 Bytes
/
Copy pathcode.gs
File metadata and controls
26 lines (24 loc) · 784 Bytes
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
function sendSMS() {
const username = PropertiesService.getScriptProperties().getProperty('username');
const password = PropertiesService.getScriptProperties().getProperty('password');
const headers = {
"Authorization": "Basic " + Utilities.base64Encode(username + ':' + password),
};
const data = {
message: "Hello from Google Apps Script!",
phoneNumbers: [
"+19162255887"
],
};
const response = UrlFetchApp.fetch(
'https://api.sms-gate.app/3rdparty/v1/message',
{
method: 'POST',
contentType: 'application/json',
headers: headers,
payload: JSON.stringify(data),
muteHttpExceptions: true
}
);
Logger.log(response);
}