mirror of
https://github.com/danog/MadelineProtoDocs.git
synced 2024-12-02 17:55:35 +01:00
1.9 KiB
1.9 KiB
title | description | grand_parent | parent | image | redirect_from |
---|---|---|---|---|---|
account.deleteAccount | Delete the user's account from the telegram servers. | Telegram RPC API | Methods | https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png | /API_docs/methods/account_deleteAccount.html |
Method: 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.
Parameters:
Name | Type | Description | Required |
---|---|---|---|
reason | string | Why is the account being deleted, can be empty | Optional |
password | InputCheckPasswordSRP | 2FA 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 » | Optional |
Return type: Bool
Can bots use this method: NO
MadelineProto Example (now async for huge speed and parallelism!):
if (!file_exists('madeline.php')) {
copy('https://phar.madelineproto.xyz/madeline.php', 'madeline.php');
}
include 'madeline.php';
$MadelineProto = new \danog\MadelineProto\API('session.madeline');
$MadelineProto->start();
$Bool = $MadelineProto->account->deleteAccount(reason: 'string', password: $InputCheckPasswordSRP, );