Ask coding questions

← Back to all posts
How to hide secret keys in a toml file?
JeanBaptisteRig

This does not work with "os" provided by replit.

Voters
JeanBaptisteRig
Comments
hotnewtop
VulcanWM

Click the padlock on the left hand side of the repl page, left to where the code is.
Enter the key of the secret in the key input and then the secret itself in the TOKEN input.
To get the secret, do:
import os
token = os.getenv(“key”)