<divid="dev_page_content"><p>If the user has successfully provided the login code, but they forgot the <ahref="/api/srp">2FA</a> password, the account should be reset: this can be done using <ahref="/method/account.deleteAccount">account.deleteAccount</a>. </p>
<p>If the account's 2FA password was modified more than 7 days ago and was active in the last 7 days, account deletion will be delayed for 7 days, and a <ahref="/constructor/updateServiceNotification">service message will be sent to the user</a>, containing a link in one of the following formats:</p>
<p>When clicked, <ahref="/method/account.sendConfirmPhoneCode">account.sendConfirmPhoneCode</a> must be called with the specified <code>hash</code>, using the account with the specified <code>phone</code> number.
This will send a phone number verification code to the phone number associated with the account.
The phone code settings are the same as for the <ahref="/api/auth">login code</a>, and <ahref="/method/auth.cancelCode">auth.cancelCode</a> with <ahref="/method/auth.resendCode">auth.resendCode</a> can be used as well, to resend or cancel the phone code as for the <ahref="/api/auth">login code</a>.</p>
<p>Once the SMS code is received, the <ahref="/method/account.confirmPhone">account.confirmPhone</a> method will have to be called with the SMS code and the phone hash received from the <ahref="/method/account.sendConfirmPhoneCode">account.sendConfirmPhoneCode</a> method.</p>
<p>This will cancel deletion of the account and will log out the user that tried to reset it.
Otherwise, if the number isn't confirmed in 7 days, the account will be deleted and the user will be free to recreate it.</p>