# Connect Telegram Bot to your AI agent

> Yes — ClawLink is a hosted Telegram Bot MCP server. 18 tools your agent can call from chat, with one-click API key and nothing to run locally.

Web version: https://claw-link.dev/hub/telegram

ClawLink hosts a managed Telegram Bot MCP server that exposes 18 tools to your AI agent. You connect Telegram Bot in one click, and your agent can read, create, and update Telegram Bot data from chat without you building or running a local MCP server.

## Quick facts

- 18 tools callable from chat
- One-click API key
- Works with OpenClaw, Hermes, Claude Code, Cursor, Codex, and any MCP client
- No local server or config files

## Overview

The usual path is: build auth, handle token refresh, wire up the tools. With ClawLink you connect Telegram Bot once and start using the real actions from the agent.

## Setup

Telegram Bot uses an API key. You paste it once during setup and ClawLink handles the rest. No secure storage to build, no per-request auth headers to manage.

Authentication: API key

## What you can do

- **Triage from chat** — Ask in plain English. The agent pulls up the right Telegram Bot thread, channel, or inbox so you stay in one window.
- **Draft, then send** — The agent writes a message in Telegram Bot, shows you the draft, and sends once you say go.
- **Context in one place** — Message history, who's involved, and recent activity from Telegram Bot sit next to the work you're doing.

## Telegram Bot tools

18 Telegram Bot tools, ready the moment you connect.

- `telegram_answer_callback_query` — Use this method to send answers to callback queries sent from inline keyboards. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert.
- `telegram_create_chat_invite_link` — Generate a new primary invite link for a chat; any previously generated primary link is revoked. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights.
- `telegram_edit_message` — Edit text messages sent by the bot. Only bot-authored messages can be edited; editing messages from other users will fail. In groups, the bot must have edit permissions.
- `telegram_forward_message` — Forward messages of any kind. Service messages can't be forwarded.
- `telegram_get_chat` — Get up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.). The bot must be a member of or have access to the target chat; calls fail if the bot was never added, was removed, or is blocked.
- `telegram_get_chat_administrators` — Get a list of administrators in a chat. On success, returns an Array of ChatMember objects containing information about all chat administrators except other bots. Only meaningful for supergroups and channels; private chats yield no useful data. The bot must be a member of the chat; if the bot has admin rights, its own entry will appear in the result, useful for verifying its permissions before moderation actions.
- `telegram_get_chat_history` — Get chat history messages via the getUpdates polling method, filtered by chat_id. Returns only updates from the specified chat. Bot can only retrieve messages sent after it joined the chat; missing older messages is expected. Requires no active webhook — a webhook causes HTTP 409 conflict; delete it before using this tool. Empty result arrays (ok=true) indicate no accessible messages, not a failure. Returned message dates are Unix timestamps in UTC seconds.
- `telegram_get_chat_member` — Get a chat member's status/role (including the bot itself) to preflight permissions and troubleshoot 403/empty-history issues. Use before sending messages to verify bot membership and permissions.
- `telegram_get_chat_members_count` — Get the number of members in a chat. The bot must be an administrator in the chat for this to work. Insufficient admin permissions surface as authorization errors, not as a zero or empty count.
- `telegram_get_me` — Get basic information about the bot using the Bot API getMe method. Returns fields like id, username, first_name, and capabilities. If the response returns ok=false, the bot token is invalid or revoked and must be replaced before any other API calls. Bot name, bio, and profile description are read-only via the Bot API; modify them via BotFather.
- `telegram_get_updates` — Use this method to receive incoming updates using long polling. An Array of Update objects is returned. IMPORTANT: This method will not work if an outgoing webhook is set up. Webhooks and getUpdates are mutually exclusive — call deleteWebhook first to switch modes (409 Conflict otherwise). Notes: - Only one method (webhook or polling) can be active at a time - Updates available for up to 24 hours if unclaimed - Recalculate offset after each response to avoid duplicates - Empty result array (ok=true) is valid, meaning no new updates - On HTTP 429, honor the retry_after value; keep polling to ~1 request/second - Only chats with updates since the bot joined or last offset appear in results - Update objects vary by type; always check update.message and update.message.text exist before accessing
- `telegram_send_document` — Send general files (documents) to a Telegram chat using the Bot API
- `telegram_send_location` — Send point on the map location to a Telegram chat using the Bot API
- `telegram_send_message` — Send a text message to a Telegram chat using the Bot API
- `telegram_send_photo` — Send photos to a Telegram chat using the Bot API
- `telegram_send_poll` — Send a native poll to a Telegram chat using the Bot API
- `telegram_set_my_commands` — Use this method to change the list of the bot's commands

## Example prompts

- **Answer callback query:** Use Telegram Bot to answer callback query and walk me through it.
- **Create chat invite link:** Create it in Telegram Bot. Confirm the key fields with me before you finish.
- **Edit message:** Use Telegram Bot to edit message and walk me through it.
- **Forward message:** Use Telegram Bot to forward message and walk me through it.

## ClawLink vs. building it yourself

| | Manual | ClawLink |
|---|---|---|
| Connection | Build it yourself. You generate and rotate Telegram Bot API keys, store them safely, keep per-environment secrets straight, and make sure every tool call uses the right key. | Hosted API key. Connect once in the browser. ClawLink owns the lifecycle. |
| Maintenance | Token refresh, permission debugging, env config, every edge case. All yours. | ClawLink handles the plumbing. You focus on the workflow. |
| Time to first call | Days to weeks. Auth, storage, tool wiring, testing. Then the agent can act. | About two minutes from sign-up to the agent calling Telegram Bot. |

## FAQ

### How do I connect Telegram Bot to my AI agent?

Install ClawLink, open the dashboard, click Connect next to Telegram Bot, and finish the API key flow. Your agent can call Telegram Bot from the next message. Two minutes, total.

### Is there a Telegram Bot MCP server I can use?

Yes. ClawLink exposes Telegram Bot as 18 tools your agent calls through a hosted MCP-compatible runtime. You don't run a local server or edit a config file. The tools are there the moment you connect.

### Do I need Telegram Bot API credentials?

Yes. You'll paste your Telegram Bot API key once during setup. ClawLink stores it and uses it for every tool call after.

### How much does it cost?

Your first integration is free, plus a 7-day trial of the full catalog. Paid plans unlock the rest of the library.

### Can I set this up from the terminal instead of the dashboard?

Yes. Run npx -y @useclawlink/cli login, then npx -y @useclawlink/cli connect telegram. The first opens a browser to sign in to ClawLink. The second opens a browser to authorize Telegram Bot. No API keys to create. Works with OpenClaw, Hermes, Claude Code, Cursor, Codex, and any agent that runs shell commands.
