account.getPassword

Obtain configuration for two-factor authorization with password

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.account.getPassword({
        }));
    console.log(result); // prints the result
})();

TL schema

account.password#ad2641f8 flags:# has_recovery:flags.0?true has_secure_values:flags.1?true has_password:flags.2?true current_algo:flags.2?PasswordKdfAlgo srp_B:flags.2?bytes srp_id:flags.2?long hint:flags.3?string email_unconfirmed_pattern:flags.4?string new_algo:PasswordKdfAlgo new_secure_algo:SecurePasswordKdfAlgo secure_random:bytes = account.Password;
---functions---
account.getPassword#548a30f5 = account.Password;

Parameters

Name

Type

Description

Result

account.Password

Possible errors

Code

Type

Description

Can bots use this methd ?

yes

Last updated