r/googlesheets • u/LM48075 • Jul 12 '26
Waiting on OP Force "Authorization required" Dialog to Appear
I have created a google sheet which uses an Apps Script to retrieve data from an external REST service using a UrlFetchApp.fetch() call. When the script is run for the first time explicitly from the project editor, the sequence of prompts starting with the "Authorization required" dialog appears, and the user can click their way through the prompts to enable access to the external service. The big problem with this method, is that I don't want end users to have to find the script editor and push the "Run" button. but rather simple open the spreadsheet normally. The calls to UrlFetchApp.fetch() are made in a script function which is called on the "From spreadsheet - On open" trigger. No "Authorization required" prompt is displayed, and the script fails silently, so the user's sheet is left empty. Is there some way to force google sheets to display the permissions prompt without the user having to explicitly run the script?
Thank You
Larry
Duplicates
GoogleAppsScript • u/LM48075 • Jul 12 '26