I am trying to create a time-based trigger from a Google Apps Script published as a WebApp.
Update: this WebApp shall be run as the user accessing it, not as the Apps Script owner.
Whenver I even try to access the ScriptApp services, I get an error in the frontend:
Authorization is required to perform that action.
Sample code to reproduce this would be:
function doGet(request) {
ScriptApp.newTrigger('test');
return ContentService.createTextOutput("OK");
};
function test() {
// noop
}
Is this something that is not possible? Is it possible to somehow automatically add a trigger that runs a method based on time with the user giving the authorization?