Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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:

enter image description here

I've already tried to:

  1. Share the spreadsheet to the user/s (Adding the user/s email address with permission Can edit)
  2. Deploy the webapp settings with the following settings:

enter image description here

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?

like image 226
BeNdErR Avatar asked Jul 08 '14 14:07

BeNdErR


People also ask

What type of authorization is used by Google script?

OAuth application user limits Applications that use OAuth to access Google user data, including Apps Script projects, are subject to authorization limits. See OAuth application user limits for details.

How do I get rid of this app was created by another user not by Google terms of service?

Go to the Security section of your Google Account. Under “Third-party apps with account access,” select Manage third-party access. Select the app or service you want to remove. Select Remove Access.


2 Answers

Since you selected to execute the app as you, you need to authorize this script first.

Just select method doGet and press run in the editor, you will get the chance to authorize.

like image 70
waterscar Avatar answered Nov 15 '22 00:11

waterscar


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.

like image 24
Zig Mandel Avatar answered Nov 15 '22 02:11

Zig Mandel