error: code: 3
"The script completed but the returned value is not a supported return type."
var res = {'status': 200, 'message': 'OK'};
return ContentService.createTextOutput().setMimeType(ContentService.MimeType.JSON).setContent(JSON.stringify(res));
chrome.identity.getAuthToken({interactive: true}, function(token) {
let init = {
method: 'POST',
async: true,
headers: {
Authorization: 'Bearer ' + token,
'Content-Type': 'application/json'
},
body: JSON.stringify(params),
contentType: 'json'
};
fetch('https://script.googleapis.com/v1/scripts/{script_id}:run', init)
.then((response) => response.json())
.then(function(data) {
console.log(data);
});
});