← Dashboard

Re-pair Telegram

Telegram pairing is just two values in this agent's .env: the bot token from @BotFather and the chat ID the bot should reply to. Changes take effect after a gateway restart (button below).

📘 Step-by-step guide: create or reuse a Telegram bot
1. Get a bot token from @BotFather
  1. Open Telegram and search for @BotFather (verified blue check).
  2. Send /newbot. BotFather asks for a display name, then a username ending in bot (e.g. nellobyte_agent2_bot). Username must be globally unique — pick one tied to the agent.
  3. BotFather replies with a token like 123456789:ABCdef-Ghi…. Copy it. Treat it like a password: anyone with the token can post as the bot.
  4. If you already have a bot, send /mybots → pick the bot → API Token to retrieve or regenerate the existing token.
2. Find the chat ID the bot should reply to
  1. In Telegram, open a chat with your new bot and send any message (e.g. /start). Without this first message, Telegram won't expose the chat to the bot's API.
  2. In a browser, hit:
    https://api.telegram.org/bot<TOKEN>/getUpdates
    (substitute your real token for <TOKEN>).
  3. Find "chat":{"id":NNNNNNNN,…} in the JSON. That number is the chat ID. Personal chats are positive integers (e.g. 8059732436); group/supergroup chats are negative (e.g. -1001234567890); public channels can be referenced as @channelname.
  4. For a group: add the bot to the group, then send a message in the group, then re-fetch getUpdates. The chat.id will be the group's ID.
3. Paste both values below
  1. Paste the chat ID into the Bot chat ID field → click Save.
  2. Paste the bot token into the Bot token field → click Verify & save. The page will call Telegram's getMe to confirm the token before persisting; on success you'll see the bot's @username + first name in the confirm dialog.
4. Restart the gateway
  1. Click Restart gateway now at the bottom of this page. The Telegram plugin reads .env at boot, so token/chat-ID changes only take effect after the restart.
  2. The active session reconnects in ~10 seconds. Send the bot a test message to confirm round-trip.
5. Group chat extras (optional)
  • By default, bots have privacy mode ON in groups — they only see messages that @-mention them or are replies to their messages. To let the bot see all group messages, send /setprivacy to BotFather, pick the bot, choose Disable.
  • If you change privacy mode, kick + re-add the bot to the group for the change to take effect.
Status
Bot chat ID
Loading…
Bot token
Loading…
Apply changes

After changing token or chat ID, restart this agent's gateway so the Telegram channel reloads with the new values. The active session reconnects within ~10 seconds.