auth.exportAuthorization
Returns data for copying authorization to another data-centre.
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.auth.exportAuthorization({
dcId: 779651,
}));
console.log(result); // prints the result
})();
TL schema
auth.exportedAuthorization#df969c2d id:int bytes:bytes = auth.ExportedAuthorization;
---functions---
auth.exportAuthorization#e5bfffcd dc_id:int = auth.ExportedAuthorization;
Parameters
Name
Type
Description
Result
Possible errors
Code
Type
Description
400
DC_ID_INVALID
The provided DC ID is invalid
Can bots use this methd ?
yes
Related pages
Last updated
Was this helpful?