Last updated 4 years ago
Was this helpful?
Request a reupload of a certain file to a .
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.reuploadCdnFile({ fileToken: Buffer.from('some bytes here'), requestToken: Buffer.from('some bytes here'), })); console.log(result); // prints the result })();
import {Api, TelegramClient} from 'telegram'; import {StringSession} from 'telegram/sessions'; const session = new StringSession(''); const client = new TelegramClient(session, apiId, apiHash, {}); (async function run() { const result: Api.Vector<FileHash> = await client.invoke(new Api.upload.reuploadCdnFile({ fileToken: Buffer.from('some bytes here'), requestToken: Buffer.from('some bytes here'), })); console.log(result); // prints the result })();
---functions--- upload.reuploadCdnFile#9b2754a8 file_token:bytes request_token:bytes = Vector<FileHash>;
Name
Type
Description
file_token
File token
request_token
Request token
Code
400
RSA_DECRYPT_FAILED
Internal RSA decryption failed