Choosing the Right Storage
Not all secrets are created equal. Compare the four primary methods to find the balance between security and convenience.
Select a method to analyze:
User Properties
RecommendedStores secrets privately for the current user. Others cannot see them.
Script Properties
Team SharedOne key shared by all editors. Good for team tools, risky for personal data.
GCP Secret Manager
EnterpriseExternal cloud storage with audit logs, rotation, and IAM controls.
Protected Sheet
Basic/RiskyHidden tab in the spreadsheet. Easiest to access, hardest to secure.
Capability Profile
User Properties
High security for individual users. The data is isolated to the specific account executing the script.
Need a Recommendation?
Select your specific use case to get an instant suggestion.
Interactive Setup Flow
Instead of hardcoding, use a dedicated setup function triggered via a custom menu to securely store user credentials.
Hover over the code
Move your mouse over the code lines on the left to understand how the secure setup logic works step-by-step.
Security Audit Simulator
Are you following best practices? Check the boxes below to see your security score.
I checked my code and removed all `const API_KEY = "xyz"` strings.
I am NOT using `Logger.log()` to print secrets or tokens.
I default to UserProperties unless sharing is strictly required.
I have a plan to rotate (change) these keys periodically.
My tokens only have the permissions they absolutely need.
Secure