Last updated 4 years ago
Was this helpful?
Log out an active web session
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.account.resetWebAuthorization({ hash: 4457235, })); 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.Bool = await client.invoke(new Api.account.resetWebAuthorization({ hash: 4457235, })); console.log(result); // prints the result })();
boolFalse#bc799737 = Bool; boolTrue#997275b5 = Bool; ---functions--- account.resetWebAuthorization#2d01b9ef hash:long = Bool;
Name
Type
Description
hash
Code
Represents a bot logged in using the