Documentation menu

Media & Albums

Media, Albums & Copy-Protection Bypass

How albums, large documents, video notes and ChatForwardsRestricted content are handled — including download-and-reupload bypass.

Verified against the checkout built for v2.2.4 · updated 20 Oct 2026

Overview

Telegram media forwarding presents unique technical challenges: albums arrive as separate asynchronous MTProto messages sharing a media_group_id, while private or copyrighted channels frequently lock content using Telegram's ChatForwardsRestricted flag.

Atomic Album Aggregation

When an album of 2 to 10 photos or videos is posted, Telegram delivers distinct updates with an identical media_group_id. Naive forwarders dispatch each item separately, cluttering destination channels.

0.8-Second Debounce Buffer

AutoTelegramForward intercepts album fragments in memory, buffers incoming parts for 800ms, and groups them into an album_messages collection.

Input: 5 individual Message updates with group_id "7891234"
↓ Debounce Aggregation Window (800ms)
Output: Single send_media_group() delivery containing all 5 items + cleaned caption

Copy-Protection Bypass (ChatForwardsRestricted)

When channel owners enable "Restrict saving content" in Telegram settings, attempting a native MTProto forward_messages() call fails immediately with:

pyrogram.errors.ChatForwardsRestricted: Telegram says: [400 CHAT_FORWARDS_RESTRICTED]

AutoTelegramForward features an automatic, seamless bypass:

  1. The forwarding worker catches ChatForwardsRestricted.
  2. The worker automatically downloads the media binary to a temporary stream.
  3. Applies all configured Cleaners and Header/Footer templates to the caption.
  4. Uploads the media as an authentic fresh post to the destination chat using send_photo, send_video, or send_document.
  5. Cleans up temporary disk buffers immediately.

Supported Media Types Reference

📸 Photos & Compressed ImagesFull resolution JPEG/PNG preservation with caption formatting.
🎥 Videos & Animations (GIFs)MP4/MOV streaming with duration, width, and height metadata.
📁 Documents & ArchivesPDF, ZIP, APK, and document files up to 2GB via MTProto user session.
🎙️ Voice Notes & Video CirclesRound video notes (Telescope) and Opus voice waveforms preserved.