Reviewing various SO posts (such as this) regarding quotas, the circumstances are so varied that I'm unclear how they apply to the webapp I'm working with. Here are features of this webapp that may bear on quotas:
- Web app is in a "consumer--@gmail.com" account.
- Web app runs under the user, with access by any Gmail user.
- Permissions for the webapp project are: userinfo.email; script.external_request; and script.send_mail.
- Read/writes to Google spreadsheets are performed by a project service account via UrlFetchApp executions, where the spreadsheets are shared with the service account.
- Permissions for the service account are: spreadsheets and script.external_request.
The quotas of concern are those that apply to the webapp project and its service account, not those applied to the individual users.
For example, if limit of 30 simultaneous executions applies to the service account, then this could be a big problem as there certainly can be more than 30 users concurrently launching executions (including UrlFetch performed by the service account). Or do the quotas apply separately to each "instance" of the service account for each user?
So, the basic question: Which quotas are going to apply to the project or to the cumulative actions of its service account on behalf of all users?
MORE SPECIFICALLY
With webapp executed as user and access by any Gmail account, is execution of the following code allocated (under Google Service quota policies) to the user's quotas or to the webapp project/service account quotas?
var clientToken = //Service account's oAuth authentication token
var urlSheet = `https://docs.google.com/spreadsheets/d/${ssID}/gviz/tq?tqx=out:json&gid=${sheetId}&tq=${encodeURI(query)}`;
var res = UrlFetchApp.fetch(urlSheet, {"method": "get", headers: {authorization: "Bearer " + clientToken}}).getContentText();
Thanks for any clarifications about this.