GetWebFileRequest
Only users can use this request. See code examples.
---functions--- upload.getWebFile#24e6818d location:InputWebFileLocation offset:int limit:int = upload.WebFile
Returns
| upload.WebFile |
This type can only be an instance of:
| WebFile |
Parameters
| location | InputWebFileLocation | |
| offset | int | |
| limit | int |
Known RPC errors
This request can cause 1 known error:
LocationInvalidError | The location given for a file was invalid. See https://core.telegram.org/api/files#downloading-files. |
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.GetWebFileRequest(
location=types.InputWebFileLocation(
url='some string here',
access_hash=-12398745604826
),
offset=42,
limit=100
))
print(result.stringify())