GetCdnFileRequest
Only users can use this request. See code examples.
---functions--- upload.getCdnFile#395f69da file_token:bytes offset:long limit:int = upload.CdnFile
Returns
upload.CdnFile |
This type can be an instance of either:
CdnFile | CdnFileReuploadNeeded |
Parameters
file_token | bytes | |
offset | long | |
limit | int |
Known RPC errors
This request can cause 1 known error:
UnknownMethodError | The method you tried to call cannot be called on non-CDN DCs. |
You can import these from telethon.errors
.
Example
from telethon.sync import TelegramClient from telethon import functions, types with TelegramClient(name, api_id, api_hash) as client: result = client(functions.upload.GetCdnFileRequest( file_token=b'arbitrary\x7f data \xfa here', offset=-12398745604826, limit=100 )) print(result.stringify())