MadelineProtoDocs/old_docs/API_docs_v109/constructors/account.password.md
2020-03-06 12:24:14 +01:00

2.7 KiB

title description image redirect_from
account.password Configuration for two-factor authorization 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

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'];

Or, if you're into Lua:

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'}