I would like to make an HTTP POST using google apps script. I have found very little documentation on this, maybe someone could kindly help?
The HTTP POST will be to
i managed to do it, here's the code:
var url = "https://api.twilio.com/2010-04-01/Accounts/ ...account.SID... /SMS/Messages.json";
var options = {
"method": "post",
"headers": {
"Authorization": "Basic " + Utilities.base64Encode(" ...account.SID... : ...auth.token... ")
},
"payload": {
"From": "+12025551212",
"To": "+14155551212",
"Body": "Test from Google Apps Script"
}
};
var response = UrlFetchApp.fetch(url, options);