TDLib options

TDLib has many options that affect the behavior of the library. Each option has a name and a value. Value may be of one of the following types:

Type of value Default value Value range
Integer 0 64-bit integer
Boolean false True or false
String Any Unicode string

List of options supported by TDLib

Options not mentioned in this list may be safely ignored.

Name Type Writable Description
always_parse_markdown Boolean Yes If true, text entities will be automatically parsed in all inputMessageText objects
disable_animated_emoji Boolean Yes If true, animated emoji will be disabled and shown as plain emoji
disable_contact_registered_notifications Boolean Yes If true, notifications about the user's contacts who have joined Telegram will be disabled. User will still receive the corresponding message in the private chat. getOption needs to be called explicitly to fetch the latest value of the option, changed from another device
disable_persistent_network_statistics Boolean Yes If true, persistent network statistics will be disabled, which significantly reduces disk usage
disable_sent_scheduled_message_notifications Boolean Yes If true, notifications about outgoing scheduled messages that were sent will be disabled
disable_time_adjustment_protection Boolean Yes If true, protection from external time adjustment will be disabled, which significantly reduces disk usage
disable_top_chats Boolean Yes If true, support for top chats and statistics collection is disabled
ignore_background_updates Boolean Yes If true, allows to skip all updates received while the TDLib instance was not running. The option does nothing if the database or secret chats are used
ignore_default_disable_notification Boolean Yes If true, the disable_notification value specified in the request will be always used instead of the default value
ignore_inline_thumbnails Boolean Yes If true, prevents file thumbnails sent by the server along with messages from being saved on the disk
ignore_platform_restrictions Boolean Yes If true, chat and message restrictions specific to the currently used operating system will be ignored
ignore_sensitive_content_restrictions Boolean Yes If true, sensitive content will be shown on all user devices. getOption needs to be called explicitly to fetch the latest value of the option, changed from another device
is_location_visible Boolean Yes If true, other users will be allowed to see the current user's location. getOption needs to be called explicitly to fetch the latest value of the option, changed from another device
language_pack_database_path String Yes Path to a database for storing language pack strings, so that this database can be shared between different accounts. By default, language pack strings are stored only in memory. Changes of value of this option will be applied only after TDLib restart, so it should be set before call to setTdlibParameters.
language_pack_id String Yes Identifier of the currently used language pack from the current localization target
localization_target String Yes Name for the current localization target (currently supported: “android”, “android_x”, “ios”, “macos” and “tdesktop”)
message_unload_delay Integer Yes The maximum time messages are stored in memory before they are unloaded, 60-86400; in seconds. Defaults to 60 for users and 1800 for bots
notification_group_count_max Integer Yes Maximum number of notification groups to be shown simultaneously, 0-25
notification_group_size_max Integer Yes Maximum number of simultaneously shown notifications in a group, 1-25. Defaults to 10
online Boolean Yes Online status of the current user
prefer_ipv6 Boolean Yes If true, IPv6 addresses will be preferred over IPv4 addresses
use_pfs Boolean Yes If true, Perfect Forward Secrecy will be enabled for interaction with the Telegram servers for cloud chats
use_quick_ack Boolean Yes If true, quick acknowledgement will be enabled for outgoing messages
use_storage_optimizer Boolean Yes If true, the background storage optimizer will be enabled
utc_time_offset Integer Yes A UTC time offset used for splitting messages by days. The option is reset automatically on each TDLib instance launch, so it needs to be set manually only if the time offset is changed during execution.
animation_search_bot_username String No Username of a bot which can be used in inline mode for animations search
authentication_token String No An authentication token to be used on subsequent authorizations
authorization_date Integer No Point in time (Unix timestamp) when authorization was received
basic_group_size_max Integer No Maximum number of members in a basic group
call_connect_timeout_ms Integer No Maximum time to wait for call connection creation to be passed to libtgvoip
call_packet_timeout_ms Integer No Maximum time to wait for call packet delivery to be passed to libtgvoip
can_archive_and_mute_new_chats_from_unknown_users Boolean No If true, the option “archive_and_mute_new_chats_from_unknown_users” can be changed
can_ignore_sensitive_content_restrictions Boolean No If true, the option “ignore_sensitive_content_restrictions” can be changed
channel_bot_user_id Integer No Identifier of the bot which is shown as the sender of messages sent on behalf of channels when viewed from an outdated client
enabled_proxy_id Integer No Identifier of the enabled proxy
expect_blocking Boolean No If true, access to Telegram is likely blocked for the user
favorite_stickers_limit Integer No Maximum number of favorite stickers
forwarded_message_count_max Integer No Maximum number of forwarded messages per one request
group_anonymous_bot_user_id Integer No Identifier of the bot which is shown as the sender of anonymous messages in groups when viewed from an outdated client
message_caption_length_max Integer No Maximum length of a message caption
message_text_length_max Integer No Maximum length of a message text
my_id Integer No Identifier of the current user
pinned_archived_chat_count_max Integer No Maximum number of pinned cloud chats in the Archive chat list. The same amount of secret chats can be pinned locally
pinned_chat_count_max Integer No Maximum number of pinned cloud chats in the Main chat list. The same amount of secret chats can be pinned locally
photo_search_bot_username String No Username of a bot which can be used in inline mode for photos search
replies_bot_chat_id Integer No Identifier of the @replies bot
suggested_language_pack_id String No Identifier of the language pack, suggested for the user by the server
suggested_video_note_audio_bitrate Integer No Suggested bit rate for audio encoding in video notes, in kbit/s
suggested_video_note_length Integer No Suggested width and height of the video in video notes
suggested_video_note_video_bitrate Integer No Suggested bit rate for video encoding in video notes, in kbit/s
supergroup_size_max Integer No Maximum number of members in a supergroup
t_me_url String No Current value of t.me URL, i.e. https://t.me/
telegram_service_notifications_chat_id Integer No Identifier of the Telegram Service Notifications chat
test_mode Boolean No If true, the test environment is being used instead of the production environment
unix_time Integer No An estimation of the current Unix timestamp. The option will not be updated automatically unless the difference between the previous estimation and the locally available monotonic clocks changes significantly
venue_search_bot_username String No Username of a bot which can be used in inline mode for venues search
version String No TDLib version. This options is guaranteed to come before all other updates

Additionally any option beginning with 'x' or 'X' is writeable and can be safely used by the application to persistently store some small amount of data.