> ## Documentation Index
> Fetch the complete documentation index at: https://n-a-818b4087.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# TelegramAPI

> Run a Telegram bot, parse updates, send media, and download attachments from Python.

TelegramAPI is a small, explicit client for the Telegram Bot API. It handles the repetitive parts of bot development: long polling, parsed message objects, file uploads, media groups, downloads, retries, and readable exceptions.

It is designed for scripts and small bots that should be easy to read and easy to debug.

> [card] [Quickstart](https://n-a-818b4087.mintlify.site/quickstart.md)
>
> Create a bot, find your chat ID, and send your first message.

> [card] [Send messages](https://n-a-818b4087.mintlify.site/guides/messages.md)
>
> Text, inline keyboards, contacts, locations, and chat actions.

> [card] [Read updates](https://n-a-818b4087.mintlify.site/guides/updates.md)
>
> Poll Telegram and work with parsed message data.

> [card] [Download files](https://n-a-818b4087.mintlify.site/guides/downloads.md)
>
> Save attachments to disk or keep them in memory.

## What it covers

* Long polling with server-side long polling and configurable failure retries
* Parsed `Message` objects alongside the untouched Telegram payload
* Text, contact, location, photo, video, audio, voice, document, sticker, animation, and video note messages
* Media groups from lists, including automatic chunking above Telegram's 10-item limit
* Files from disk, URLs, Telegram file IDs, in-memory bytes, and open file objects
* Inline keyboards, callback answers, chat actions, and message edits
* Forwarding, copying, deleting, pinning, and unpinning messages
* Downloads to disk or memory with custom names
* Webhooks and bot, chat, and file information
* Typed exceptions for API, network, and timeout failures

## Requirements

* Python 3.10 or newer
* `requests`

All sending methods return a parsed `Message` object. Media-group sends return a list of `Message` objects. `copy_message` returns a dictionary containing the new `message_id`, and methods that only confirm success return Telegram's raw result, usually `True`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.