telegram-export

Installation
SKILL.md

telegram-export

Overview

Export messages, media, and data from Telegram chats, groups, and channels. This skill covers two approaches: Telegram Desktop's built-in export (GUI, good for personal use) and Telethon (Python library for programmatic access through Telegram's MTProto API, signed in as your own account). Use cases range from personal chat backups to bulk media download from channels to data analysis of group conversations.

Instructions

Step 1: Get Telegram API Credentials

All programmatic approaches require API credentials from Telegram.

  1. Go to https://my.telegram.org and log in with your phone number.
  2. Click "API development tools."
  3. Create a new application — fill in app title and short name (anything works).
  4. Save your api_id (integer) and api_hash (string).

The credentials are free and tied to your Telegram account: one api_id per phone number. The api_hash is a secret that Telegram does not let you revoke, so keep both in environment variables (TELEGRAM_API_ID, TELEGRAM_API_HASH), never in a script.

Installs
3
GitHub Stars
197
First Seen
Mar 13, 2026