ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified

Telegram Bot API

Build Telegram bots with correct API calls, message formatting, keyboards, and webhook setup.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/ivangdavila/telegram-bot-api
Or

Setup

On first use, read setup.md for integration guidelines.

When to Use

User needs to interact with the Telegram Bot API. Building bots, sending messages, handling updates, setting up webhooks, creating keyboards, or managing bot commands.

Architecture

Memory lives in ~/telegram-bot-api/. See memory-template.md for structure.

~/telegram-bot-api/
├── memory.md          # Bot tokens, preferences, defaults
├── bots/              # Per-bot configurations
│   └── {botname}.md   # Token, webhook URL, defaults
└── templates/         # Reusable message templates

Quick Reference

TopicFile
Setup processsetup.md
Memory templatememory-template.md
All API methodsmethods.md
Message formattingformatting.md
Keyboards & buttonskeyboards.md
Webhooks & pollingwebhooks.md
Media handlingmedia.md
Error codeserrors.md

Core Rules

1. API Base URL

All requests go to:

https://api.telegram.org/bot{TOKEN}/{METHOD}

Never expose the token in logs or user-visible output.

2. Required Parameters by Method

MethodRequiredOptional (common)
sendMessagechat_id, textparse_mode, reply_markup, disable_notification
sendPhotochat_id, photocaption, parse_mode
sendDocumentchat_id, documentcaption, thumbnail
getUpdatesoffset, limit, timeout
setWebhookurlcertificate, max_connections
deleteWebhookdrop_pending_updates
getMe

3. Parse Mode Selection

FormatUse whenEscape chars
MarkdownV2Rich formatting needed_*[]()~\>#+-=
HTMLComplex nesting, safer<>&
NonePlain text onlyNone

Default to HTML — fewer escape issues than MarkdownV2.

4. Chat ID Types

TypeFormatExample
UserPositive integer123456789
GroupNegative integer-123456789
Supergroup/Channel-100 prefix-1001234567890

5. Rate Limits

ScopeLimit
Same chat1 msg/sec
Different chats30 msg/sec
Groups20 msg/min per group
Bulk notificationsUse sendMessage with different chat_ids

When hitting 429 errors, use exponential backoff starting at retry_after seconds.

6. Message Length Limits

TypeLimit
Text message4096 chars
Caption1024 chars
Callback data64 bytes
Inline query256 chars

Split long messages at sentence boundaries, not mid-word.

7. Keyboard Best Practices

Inline keyboards (in message):

  • Max 8 buttons per row
  • Max 100 buttons total
  • Use callback_data for bot actions
  • Use url for external links

Reply keyboards (below input):

  • Use for frequent options
  • one_time_keyboard: true to hide after use
  • resize_keyboard: true for better mobile UX

Metadata

Stars2102
Views0
Updated2026-03-06
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-ivangdavila-telegram-bot-api": {
      "enabled": true,
      "auto_update": true
    }
  }
}
Safety NoteClawKit audits metadata but not runtime behavior. Use with caution.