Skip to content

telegram-bot-api

Use when working with Telegram Bot API for sending messages, handling updates, managing keyboards, sending media, or debugging bot errors. Also use when setting up authentication, handling rate limits, or working with Bot API types.

ModelSource
inheritpack: telegram
ItemValue
Current versionBot API 9.5 (March 1, 2026)
Base URLhttps://api.telegram.org/bot<token>/
AuthBot token from BotFather — passed in URL path
FormatJSON (POST body or GET params)
Docscore.telegram.org/bots/api
Full Reference

┏━ 🔧 telegram-bot-api ━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ Telegram Bot API 9.5 reference ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

ItemValue
Current versionBot API 9.5 (March 1, 2026)
Base URLhttps://api.telegram.org/bot<token>/
AuthBot token from BotFather — passed in URL path
FormatJSON (POST body or GET params)
Docscore.telegram.org/bots/api
FileContents
reference/methods.mdCore methods — sendMessage, sendPhoto, editMessageText, deleteMessage, keyboards, rate limits
reference/updates.mdUpdate types — Message, CallbackQuery, InlineQuery, getUpdates polling vs webhook, update lifecycle

Usage: Read the reference file matching your current task. Each file has working code examples and inline gotchas.

Terminal window
# Test your token
curl https://api.telegram.org/bot<YOUR_TOKEN>/getMe
const BOT_TOKEN = process.env.TELEGRAM_BOT_TOKEN;
const BASE = `https://api.telegram.org/bot${BOT_TOKEN}`;
async function sendMessage(chatId: number, text: string) {
const res = await fetch(`${BASE}/sendMessage`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ chat_id: chatId, text }),
});
return res.json();
}