Secret environment variable is an environment variable type which allows users to store their secret variables locally.
By default, Insomnia does not save the vault key, so users must store it securely, as it will be required after re-login or when accessing Insomnia on another device. If the vault key is forgotten, users can reset it, but this will permanently delete all secret variables for security reasons.
Unlike normal environment variables, secret environment variables are stored as encrypted text rather than plain text, their values remain masked unless used in a request, and they are automatically added to a vault namespace when referenced.
For example, a secret variable named foo
can be accessed as vault.foo
.
Generate a vault key in the Preferences page
Create a new sub private environment within any global environment.
Add your environment variable to the newly created sub private environment, choose the environment type to Secret
.