This flow keeps your token and chat id out of the repository.
- Open Telegram and start a chat with
@BotFather - Send
/newbot - Choose a display name
- Choose a bot username ending in
bot - Copy the token BotFather returns
Do not paste that token into Git, screenshots, or public issues.
Useful BotFather commands:
/setdescription/setabouttext/setuserpic/setcommands
If you plan to use the bot only in a private chat, no group-specific setting is required.
The injected Telegram runtime syncs the bot command list itself when it starts. You do not need to manually keep BotFather commands in sync after every code change.
- Open the new bot
- Press
Startor send any message such ashello - In a browser, open:
https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getUpdates
- Find
message.chat.id
Private chat ids are usually a plain positive integer.
Create:
%APPDATA%\Codex\telegram-native.json
Start from examples/telegram-native.example.json.
Minimum required fields:
telegramBotTokenallowedChatIdsworkspaceRoots
Never commit:
telegram-native.jsonchat_bindings.jsonchat_settings.jsontelegram-native-inbox/telegram-native-state/work/
This repository's .gitignore already blocks those paths. Keep it that way.
If command buttons or slash-command suggestions show up on mobile but not on Telegram Desktop, restart Telegram Desktop once. The Bot API state can already be correct while the Desktop client UI is still stale.