Interface SetTdlibParameters

Sets the parameters for TDLib initialization. Works only when the current authorization state is authorizationStateWaitTdlibParameters. Request type for Tdjson#setTdlibParameters.

interface SetTdlibParameters {
    @type: "setTdlibParameters";
    api_hash: string;
    api_id: number;
    application_version: string;
    database_directory: string;
    database_encryption_key: string;
    device_model: string;
    files_directory: string;
    system_language_code: string;
    system_version: string;
    use_chat_info_database?: boolean;
    use_file_database?: boolean;
    use_message_database?: boolean;
    use_secret_chats?: boolean;
    use_test_dc?: boolean;
}

Properties

@type: "setTdlibParameters"
api_hash: string

Application identifier hash for Telegram API access, which can be obtained at https://my.telegram.org.

api_id: number

Application identifier for Telegram API access, which can be obtained at https://my.telegram.org.

application_version: string

Application version; must be non-empty.

database_directory: string

The path to the directory for the persistent database; if empty, the current working directory will be used.

database_encryption_key: string

Encryption key for the database. If the encryption key is invalid, then an error with code 401 will be returned.

device_model: string

Model of the device the application is being run on; must be non-empty.

files_directory: string

The path to the directory for storing files; if empty, database_directory will be used.

system_language_code: string

IETF language tag of the user's operating system language; must be non-empty.

system_version: string

Version of the operating system the application is being run on. If empty, the version is automatically detected by TDLib.

use_chat_info_database?: boolean

Pass true to keep cache of users, basic groups, supergroups, channels and secret chats between restarts. Implies use_file_database.

use_file_database?: boolean

Pass true to keep information about downloaded and uploaded files between application restarts.

use_message_database?: boolean

Pass true to keep cache of chats and messages between restarts. Implies use_chat_info_database.

use_secret_chats?: boolean

Pass true to enable support for secret chats.

use_test_dc?: boolean

Pass true to use Telegram test environment instead of the production environment.