You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It works if I run the function from the script editor, but not if I run it from the onOpen() handler.
Here's the error message in the StackDriver Logging:
Exception: You do not have permission to call Ui.showSidebar. Required permissions: https://www.googleapis.com/auth/script.container.ui
at onOpen(Code:5:8)
Here's some very basic sample code recreating the problem:
function onOpen() {
const html = HtmlService.createHtmlOutputFromFile('Index');
const ui = SpreadsheetApp.getUi();
ui.showSidebar(html);
}
To allow this add the next scope to
appsscript.json
The text was updated successfully, but these errors were encountered: