Share a Google App Script to other users - permission requested & authorize script

google-apps-script, google-drive-api, google-sheets, user-permissions

Solution

The problem is you are mixing web app with ui dialog on a sheet. The webapp is accesed from the webapp url (given when you publish the webapp). The ui dialog is a window shown on top of the spreadsheet. You want to use webapp, follow the tutorial for that. Publish it to be accesed from the domain if all users are in the same gapps domain. Else use public anonymous. Run doGet before publish to authorize. Its also possible to do the other ui-on-sheet but you need more steps for each user to authorize.

Problem

I've created a spreadsheet with some GAS behind it that opens a form with some inputs, and now I need to deploy the webapp and share it to some other users. The problem is that when the other users try to open the spreadsheet (shared in Google Drive), they get this error message: I've already tried to: - Share the spreadsheet to the user/s (Adding the user/s email address with permission Can edit) - Deploy the webapp settings with the following settings: As you can see, the setting screen reports "You need to authorize the script before distributing the URL". How can I authorize the script? I can't find a way to do that. Do you know if there's another way to share and let other users run the script?

Original source