MadelineProtoDocs/docs/API_docs/constructors/account.password.md
2024-05-01 14:53:46 +02:00

2.9 KiB

title description nav_exclude image redirect_from
account.password Configuration for two-factor authorization true https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png /API_docs/constructors/account_password.html

Constructor: account.password

Back to constructors index

Configuration for two-factor authorization

Attributes:

Name Type Required Description
has_recovery Bool Optional Whether the user has a recovery method configured
has_secure_values Bool Optional Whether telegram passport is enabled
has_password Bool Optional Whether the user has a password
current_algo PasswordKdfAlgo Optional The KDF algorithm for SRP two-factor authentication of the current password
srp_B bytes Optional Srp B param for SRP authorization
srp_id long Optional Srp ID param for SRP authorization
hint string Optional Text hint for the password
email_unconfirmed_pattern string Optional A password recovery email with the specified pattern is still awaiting verification
new_algo PasswordKdfAlgo Yes The KDF algorithm for SRP two-factor authentication to use when creating new passwords
new_secure_algo SecurePasswordKdfAlgo Yes The KDF algorithm for telegram passport
secure_random bytes Yes Secure random string
pending_reset_date int Optional The 2FA password will be automatically removed at this date, unless the user cancels the operation
login_email_pattern string Optional A verified login email with the specified pattern is configured

Type: account.Password

Example:

$account_password = ['_' => 'account.password', 'has_recovery' => Bool, 'has_secure_values' => Bool, 'has_password' => Bool, 'current_algo' => PasswordKdfAlgo, 'srp_B' => 'bytes', 'srp_id' => long, 'hint' => 'string', 'email_unconfirmed_pattern' => 'string', 'new_algo' => PasswordKdfAlgo, 'new_secure_algo' => SecurePasswordKdfAlgo, 'secure_random' => 'bytes', 'pending_reset_date' => int, 'login_email_pattern' => 'string'];