/appscripts

Miscellaneous Google Apps Script projects

Primary LanguageJavaScriptMIT LicenseMIT

appscripts

Miscellaneous Google Apps Script projects.

Deployment

Example guide to deploy an endpoint that any app you make can access without needing to authenticate:

  1. Go to https://script.google.com/ and create a new project
  2. Copy and paste (and save!) your code into the new project's script, overwriting the contents
  3. Select Deploy → New Deployment
  4. In the New Deployment dialogue, click the gear next to "Select type" and choose "Web app"
  5. Fill in the following settings and then Deploy
    • Execute as: Me
    • Who has access: Everyone
  6. Copy your Deployment ID (api key) ** Don't share this! **

Now that you've deployed your own api, you can enter the api key into your client app. For an example client app feel free to check out subtitle-chan, specifically this hook.

Don't share your Deployment ID with anyone you don't want accessing your endpoint! There is no protection with the above config.

Google Apps Script has a quota of 5000 requests per day for free user accounts. If you run out of quota, you can upgrade to a paid Google Workspace account (your quota will increase from 5k → 20k calls per day).

Note that web app url contains the Deployment ID (key) already, it's formatted like: https://script.google.com/macros/s/<Deployment ID>/exec