r/GoogleAppsScript • u/aaaaAaaaAaaARRRR • Jun 18 '25
Question How to store API keys?
For context:
The Google doc/sheets/slide is per user. No one will have access to the docs, but the user.
The Google doc/sheets/slide is a template with no user properties. Users will have to make a copy and save a copy in their own GDrive.
Currently storing the API key in User Properties. Security team flagged it and said that it’s a no go. How else can I store the keys?
My solutions:
- Prompt the user to paste the API keys every time.
- Save the keys in user properties, and do a daily trigger to reset user properties.
- ???
I’m trying to make it as easy for the user. I’ve already saved about 45 minutes of time for the user per Google doc/sheets/slide. I’m trying to make it simpler for the end user.
View all comments
Show parent comment
1
u/aaaaAaaaAaaARRRR Jun 18 '25
You’re right. API keys are different per user, hence the prompt at the beginning when they initialize the script. Those docs/sheets/slides will only be for the user and they’ll only have access to those docs. But, I see where security is coming from as well.