account.deleteAccount #

Delete the user's account from the telegram servers.

Can also be used to delete the account of a user that provided the login code, but forgot the 2FA password and no recovery method is configured, see here » for more info on password recovery, and here » for more info on account deletion.

Layer 223

boolFalse#bc799737 = Bool;
boolTrue#997275b5 = Bool;
---functions---
account.deleteAccount#a2c0cf74 flags:# reason:string password:flags.0?InputCheckPasswordSRP = Bool;

Parameters #

NameTypeDescription
flags#Flags, see TL conditional fields
reasonstringWhy is the account being deleted, can be empty
passwordflags.0?InputCheckPasswordSRP2FA password: this field can be omitted even for accounts with 2FA enabled: in this case account account deletion will be delayed by 7 days as specified in the docs »

Result #

Bool

Only users can use this method #

This method can be invoked over an unauthenticated connection » #

Possible errors #

CodeTypeDescription
4202FA_CONFIRM_WAIT_%dSince this account is active and protected by a 2FA password, we will delete it in 1 week for security purposes. You can cancel this process at any time, you'll be able to reset your account in %d seconds.
400PASSWORD_HASH_INVALIDThe provided password hash is invalid.

Two-factor authentication #

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

Account deletion #

How to reset an account if the 2FA password was forgotten.