Keys / Telegram
TELEGRAM_BOT_TOKEN
The token your app uses to control a Telegram bot through the Bot API. @BotFather gives you one when you create a bot with /newbot.
- Expires
- the docs don't say
- API
- replace only, for managed bots; others use @BotFather
Get it
Create one on t.me/botfather. The steps aren't recorded yet.
Set it
TELEGRAM_BOT_TOKEN=...
The Bot API libraries Telegram lists are community projects it doesn't maintain, so your app reads the variable and passes the token in. Or keep it out of .env with keypin: keypin run -- npm run dev
Replace it
- Send
/tokento @BotFather to generate a new token for the bot. - Deploy it everywhere the bot runs right away. The docs don't say whether the old token keeps working.
- For a managed bot, the manager bot can call
replaceManagedBotTokeninstead. It revokes the current token and returns a new one.
Set rotate_every on the key in keypin.toml and a rotated date on its vault item, and keypin status shows when it's due.