@chat-adapter/telegram weekly downloads statistics
By chat-adapter (14 listings) · npm · AI SDKs
Telegram adapter for Chat SDK — Bot API webhooks, inline keyboards, reactions, and streaming
@chat-adapter/telegram has 645,645 recorded weekly downloads on npm, an increase of 40.2% over the past 30 days, ranking #341 of 3,247 tracked listings.
About @chat-adapter/telegram
@chat-adapter/telegram
npm package:
@chat-adapter/telegram
Telegram adapter for Chat SDK. Configure for bot webhooks and messaging.
Documentation: chat-sdk.dev/adapters/official/telegram · Guides: vercel.com/kb/chat-sdk
Installation
pnpm add @chat-adapter/telegram
Scaffold with the CLI
To scaffold a new Telegram bot with this adapter preselected:
npx create-chat-sdk@latest my-bot --adapter telegram memory
Visit the adapters directory to see other available official and vendor-official adapters.
Quick start
For managed credentials, see Vercel Connect.
The adapter auto-detects TELEGRAM_BOT_TOKEN, TELEGRAM_WEBHOOK_SECRET_TOKEN, TELEGRAM_ALLOW_UNVERIFIED_WEBHOOKS, TELEGRAM_BOT_USERNAME, TELEGRAM_MENTION_ON_REPLY, and TELEGRAM_API_BASE_URL from environment variables:
import { Chat } from "chat";
import { createTelegramAdapter } from "@chat-adapter/telegram";
const bot = new Chat({
userName: "mybot",
adapters: {
telegram: createTelegramAdapter(),
},
});
bot.onNewMention(async (thread, message) => {
await thread.post(`You said: ${message.text}`);
});
Configuration
Most options are auto-detected from environment variables when not provided. nativeStreaming, persistThreadHistory, streamingEditIntervalMs, and longMessages are config only and have no environment variables.
| Option | Required | Description |
|---|---|---|
allowUnverifiedWebhooks | No | Accept webhook requests without secret-token verification. Auto-detected from TELEGRAM_ALLOW_UNVERIFIED_WEBHOOKS=true. Use only for local development or behind a trusted verifying proxy |
allowedUserIds | No | Telegram user IDs allowed to trigger the adapter. Auto-detected from TELEGRAM_ALLOWED_USER_IDS (comma-separated). All users are allowed when omitted or empty |
botToken | No* | Telegram bot token. Auto-detected from TELEGRAM_BOT_TOKEN |
secretToken | Webhook* | Webhook secret token. Auto-detected from TELEGRAM_WEBHOOK_SECRET_TOKEN |
mode | No | Adapter mode: auto (default), webhook, or polling |
longPolling | No | Optional long polling config for getUpdates (timeout, limit, allowedUpdates, deleteWebhook, dropPendingUpdates, retryDelayMs) |
businessMode | No | Enable Telegram Business mode (business_connection, business_message, edited_business_message). Defaults to false |
userName | No | Bot username used for mention detection. Auto-detected from TELEGRAM_BOT_USERNAME or getMe |
mentionOnReply | No | Treat a reply to one of the bot's own messages as a mention, so it routes to onNewMention. Defaults to false. Auto-detected from TELEGRAM_MENTION_ON_REPLY=true. Implicit forum-topic replies and the bot's own messages never count |
nativeStreaming | No | Stream with Telegram's native draft previews in private chats. Defaults to false, which uses post-and-edit in every chat type |
persistThreadHistory | No | Save incoming messages and the bot's own posts in the Chat state adapter so thread.messages and channel.messages return earlier turns. Defaults to true. Telegram has no Bot API for reading chat history, so with false handlers see only messages cached in the current process. Turn it off when your app keeps its own transcript |
streamingEditIntervalMs | No | Minimum interval between edits on the post-and-edit streaming path. Defaults to 1100 in private chats and 3100 in other chats, and acts as a floor for the Chat-level streamingUpdateIntervalMs |
longMessages | No | How text posts longer than Telegram's message limit are sent: truncate (default) cuts them with an ellipsis, split sends the full text as consecutive messages. See Long messages |
apiUrl | No | Telegram API base URL. Auto-detected from TELEGRAM_API_BASE_URL. Use apiUrl for cross-adapter consistency; the legacy apiBaseUrl alias is still accepted |
logger | No | Logger instance (defaults to ConsoleLogger("info")) |
*botToken is always required. Webhook mode also requires secretToken unless allowUnverifiedWebhooks is explicitly enabled. Polling mode does not require webhook verification.
Authentication
Use Vercel Connect to manage the outbound bot token, or provide the token directly. Both options use Telegram's native webhook verification; polling does not require a webhook secret.
Option A — Vercel Connect
Use connectTelegramAdapter to resolve the outbound bot token from Vercel
Connect:
import { createTelegramAdapter } from "@chat-adapter/telegram";
import { connectTelegramAdapter } from "@vercel/connect/chat";
const telegram = createTelegramAdapter({
...connectTelegramAdapter("telegram/acme-telegram"),
secretToken: process.env.TELEGRAM_WEBHOOK_SECRET_TOKEN,
});
```…
Description from the npm listing.
- chat
- chat-sdk
- chatbot
- telegram
- telegram-bot
- bot
- adapter
- bot-api
- messaging
- ai-agent
- ai-sdk
- vercel
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (170)Similar npm AI SDKs plugins
All 20 @chat-adapter/telegram alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/@chat-adapter/telegram. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.