I am trying to perform a POST of the action, however, when I make the request I get code 400 speaking that the action value is missing.
my code:
func
UrlFetchApp doesn't have a data
key parameter. Use payload
instead.
UrlFetchApp
UrlFetchApp.fetch(url,
{
method: "POST",
headers: {
"Authorization": "Bearer " + ScriptApp.getOAuthToken(),
},
contentType: 'application/json',
payload: JSON.stringify({
"action": "block"
}),
muteHttpExceptions: true
});