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
Name
Type
Description
Result
Possible errors
Code
Type
Description
400
PASSWORD_HASH_INVALID
The provided password hash is invalid
Can bots use this methd ?
yes
Related pages
How to login to a user's account if they have enabled 2FA, how to change password.
Last updated
Was this helpful?