account.getPasswordSettings

Get private info associated to the password info (recovery email, telegram passport info & so on)

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.getPasswordSettings({
        password: new Api.InputCheckPasswordSRP({...}),
        }));
    console.log(result); // prints the result
})();

TL schema

account.passwordSettings#9a5c33e5 flags:# email:flags.0?string secure_settings:flags.1?SecureSecretSettings = account.PasswordSettings;
---functions---
account.getPasswordSettings#9cd4eaf9 password:InputCheckPasswordSRP = account.PasswordSettings;

Parameters

Result

account.PasswordSettings

Possible errors

Can bots use this methd ?

yes

How to login to a user's account if they have enabled 2FA, how to change password.

Last updated