Telegram: get fileid from telegram client Telegram: get fileid from telegram client android android

Telegram: get fileid from telegram client


Here's the TL scheme for bot API file ids: https://github.com/danog/MadelineProto/blob/master/src/danog/MadelineProto/TL_botAPI.tl

I have implemented bot API file id conversion in MadelineProto: you basically have to base64decode the file ids, pass them through an RLE decoder based on null byte, and then decode them using the given TL scheme.See TL/Conversion/BotAPI* to see how MessageMedia objects are converted to a File objects before serialization.

I managed to reverse engineer file ids (I forgot to search here xd) using this special MTProto bot I built using the same lib.