Layer 220
AccountDeleteAccount
Delete the user's account from the telegram servers.
method
Users
account.deleteAccount#a2c0cf74 flags:# reason:string password:flags.0?InputCheckPasswordSRP = Bool;
Parameters
| Name | Type | Description |
|---|---|---|
| Flags | # | Flags, see TL conditional fields |
| Reason | string | Why is the account being deleted, can be empty |
| Password | flags.0?InputCheckPasswordSRP | 2 FA password: this field can be omitted even for accounts with 2 FA enabled: in this case account account deletion will be delayed by 7 days as specified in the docs |
Returns
BoolPossible Errors
| Code | Type | Description |
|---|---|---|
| 420 | 2FA_CONFIRM_WAIT_%d | Since this account is active and protected by a 2 FA 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 <number> seconds. |
| 400 | PASSWORD_HASH_INVALID | The provided password hash is invalid. |
Gogram Example
// AccountDeleteAccount - using Params struct result, err := client.AccountDeleteAccount(&tg.AccountDeleteAccountParams{ Reason: "...", // Optional fields: // Password: &tg.InputCheckPasswordSrp{}, }) if err != nil { // handle error } // result is *tg.Bool