• Enable 2FA password on your account

    Note that if you pass email, EmailUnconfirmedError may be thrown, and you should use verifyPasswordEmail, resendPasswordEmail or cancelPasswordEmail, and the call this method again

    Parameters

    • client: ITelegramClient
    • params: { email?: string; hint?: string; password: string }
      • Optionalemail?: string

        Recovery email

      • Optionalhint?: string

        Hint for the new password

      • password: string

        2FA password as plaintext

    Returns Promise<void>