upload.getCdnFile
Download a CDN file.
Example
const {Api, TelegramClient} = require('telegram');
const {StringSession} = require('telegram/sessions');
const session = new StringSession('');
const client = new TelegramClient(session, apiId, apiHash, {});
(async function run() {
const result = await client.invoke(new Api.upload.getCdnFile({
fileToken: Buffer.from('some bytes here'),
offset: 1130267,
limit: 8166765,
}));
console.log(result); // prints the result
})();
TL schema
upload.cdnFileReuploadNeeded#eea8e46e request_token:bytes = upload.CdnFile;
upload.cdnFile#a99fca4f bytes:bytes = upload.CdnFile;
---functions---
upload.getCdnFile#2000bcc3 file_token:bytes offset:int limit:int = upload.CdnFile;
Parameters
Result
Possible errors
Code
Type
Description
Can bots use this methd ?
yes
Related pages
Last updated
Was this helpful?