I am trying to trigger a deployment through Webhook from google scripts with UrlFetchApp post method but I am getting the following Error
Exception: Request failed for https://api.netlify.com returned code 404. Truncated server response: Not Found
The webhook working fine from Postman - Thunder client.
function postRequest() {
// Make a POST request
var url = 'https://api.netlify.com/build_hooks/number';
var options = {
'method' : 'post'
};
response = UrlFetchApp.fetch(url, options);
var text = response.getResponseCode();
console.log(response)
}