Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
149 views
in Technique[技术] by (71.8m points)

Add-on & Web Apps: Limitations and Who Has Access - Only Me vs Anyone With a Google Account

I wrote a Telegram bot and it works well. Bot users receive questions from the bot, and their answers are entered into a table. The logic of work is provided by one project, deployed as a web app with permissions: "Execut as: Me, Who has access: Anyone". Permissions: "In this case, the script always executes as you, the owner of the script, no matter who accesses the web app".
Therefore, when the script is running, my limitations are used. Current_limitations: "Simultaneous executions on the Consumer (e.g., 1 gmail.com) 30".

I do not plan to give users access to the project.

If the bot has more than 30 users, I will need to take steps to avoid the "30 simultaneous executions on the Consumer" limitation. To do this, I suppose when deploying to set the "Execut as: User accessing the webapp" permission. Permissions: "In this case, the script runs under the identity of the active user using the web app".
Therefore, in this case, for each user of the bot, not my limitations will be used, but the limitations of each such user.

When I choose the permission: "Execut as: User accessing the webapp" I get an alternative:

  1. Who has access: Only myself.
  2. Who has access: Anyone with Google account.

I studied the help resources on this topic at https://developers.google.com and publications at https://stackoverflow.com but I did not find a clear explanation of how the first differs from the second, so I have to make assumptions. Article @tanaikech taking-advantage-of-Web-Apps-with-google-apps-script helped and made some clarity, but the aspect of limitations when choosing "Execut as: User accessing the webapp, Who has access: Anyone with Google account" is also not clearly reflected in it (with examples of code).

I assume that if "Only myself" is selected, the webapp will be used on behalf of the webapp owner (me), and if "Anyone with Google account" is selected, the webapp will be used on behalf of the user. And, when choosing the first option, my limit (30 simultaneous executions on the Consumer) will still be used, and when choosing the second, the user limit will be used. Therefore, I have no choice and must select "Execut as: User accessing the webapp, Who has access: Anyone with Google account".

Question.

Do I understand correctly that then splitting the project into two parts: 1) a web application deployed with the "Run as: user who has access to the web application, who has access: any user with a Google account" permissions (with the functions a. user authorization (will need to add token) and b. data transfer), and 2) a spreadsheet add-on that handles the data, will help me avoid the limitation of 30 simultaneous executions?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...