Ask coding questions

← Back to all posts
How do I hide my token now that I cant use .env files
JVaunPaul

I just made a bot and I wanna know how to hide the token cuz i discorvered that .env files dont work. Pls Help

Voters
JVaunPaul
Comments
hotnewtop
Coder100

Use the environment variables (the padlock) for easier and more sane token management.

Otherwise it is the same:
https://docs.replit.com/repls/secrets-environment-variables#secrets-environment-variables

do note it is a bit buggy

IMayBeMe

Click the little lock icon which now functions as the new env files

ch1ck3n
ch1ck3n

@ch1ck3n
just press the lock on the left and add your keys and values. to get the values, it's the same as env. os.getenv("ee")

ruiwenge2

you can use secrets: