Miscellaneous Google Apps Script projects.
Example guide to deploy an endpoint that any app you make can access without needing to authenticate:
- Go to https://script.google.com/ and create a new project
- Copy and paste (and save!) your code into the new project's script, overwriting the contents
- Select Deploy → New Deployment
- In the New Deployment dialogue, click the gear next to "Select type" and choose "Web app"
- Fill in the following settings and then Deploy
- Execute as: Me
- Who has access: Everyone
- 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