• Utility function to quickly authorize on test DC using a Test phone number, which is randomly generated by default.

    Note: Using this method assumes that you are using a test DC in primaryDc parameter.

    Parameters

    • client: ITelegramClient
    • Optionalparams: {
          dcId?: number;
          logout?: boolean;
          phone?: string;
      }

      Additional parameters

      • OptionaldcId?: number

        Override user's DC. Must be a valid test DC.

      • Optionallogout?: boolean

        Whether to log out if current session is logged in.

        false.
        
      • Optionalphone?: string

        Override phone number. Must be a valid Test phone number.

        By default is randomly generated.

    Returns Promise<User>