2
votes

I deployed a web app from a Google Apps Script, but others don't seem to be able to run it. (It runs fine for me when logged-in to Google)

I keep getting "Request to share" email, even though I set the source script to be "Public on the Web".

"Execute the app as:" is set to "User accessing the web app".

A link to the app is at http://truevis.com/rations

It could be very useful to others, but right now I think that no one else can run it.

3
What is more important is the question - "Who can access the app". Have you set it to Anyone or Anyone, including anonymousSrik

3 Answers

3
votes

The link you show here is the development link , the one that is described as "the last saved version of your code", this link is not shareable ... the one you should give to people is this one :

https://script.google.com/macros/s/AKfycbz1SKJi5HW1r2ZHiYpjedjul-IE4vcB266kdDzDrVCE/exec

it is shown in this popup window

enter image description here

beside that, the sharing properties of the script file is not relevant, you could keep it private.... only the settings in this window are important to determine who has access to your app and how (meaning run as you or as user accessing the app).

You should also keep in mind that users will see the version you have chosen in this same popup window, no matter the changes you could have saved and are using in your .dev version... so think about publishing the right version.

1
votes

What I did to get it working:

I copied the GS code to a new file, deployed as Web app, then set "Execute the app as:" "me", "Who has access to the app:" "anyone even anonymous".

https://script.google.com/macros/s/AKfycbwPtys8PE8Wda_HS9rvrdftJ0TGbCfMlT5xLlfsNFt9m5uw6qM/exec

1
votes

I think once you deploy a version with certain permission, it does not work properly if you change the permission for the same version.

Creating a new version seems to solve the problem