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 |
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_network_statistics | Boolean | Yes | Since TDLib 1.8.24. If true, then network statistics will be completely disabled |
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_file_names | Boolean | Yes | Since TDLib 1.8.24. If true, document file names will be ignored and numerical names will be used instead |
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 |
process_pinned_messages_as_mentions | Boolean | Yes | Since TDLib 1.8.24. If true, then all pinned messages will be treated as mentions even posted without notification of chat members |
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. |
active_story_count_max | Integer | No | Since TDLib 1.8.24. The maximum number of active stories posted by the current user |
added_shareable_chat_folder_count_max | Integer | No | Since TDLib 1.8.24. The maximum number of added shareable chat folders for the current user |
animation_search_bot_username | String | No | Username of a bot which can be used in inline mode for animations search |
anti_spam_bot_user_id | Integer | No | Since TDLib 1.8.24. User identifier of the Telegram Anti-Spam bot |
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 |
bio_length_max | Integer | No | Since TDLib 1.8.24. The maximum allowed length of the current user's bio |
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 |
can_use_text_entities_in_story_caption | Boolean | No | Since TDLib 1.8.24. If true, then the current user can use text entities in story captions |
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 |
chat_available_reaction_count_max | Integer | No | Since TDLib 1.8.24. The maximum number of manually chosen reactions for a chat |
chat_boost_level_max | Integer | No | Since TDLib 1.8.24. The maximum boost level available to a chat |
chat_folder_chosen_chat_count_max | Integer | No | Since TDLib 1.8.24. The maximum number of always included or excluded chats in a chat folder for the current user |
chat_folder_count_max | Integer | No | Since TDLib 1.8.24. The maximum number of chat folders that the current user can have |
chat_folder_invite_link_count_max | Integer | No | Since TDLib 1.8.24. The maximum number of shareable chat folders with owned invite links |
chat_folder_new_chats_update_period | Integer | No | Since TDLib 1.8.24. The minimum interval between calls to getChatFolderNewChats in shareable chat folders |
commit_hash | String | No | Since TDLib 1.8.24. If known, the hash of the source code commit that was used to build TDLib. Can be received synchronously. |
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 |
gift_premium_from_attachment_menu | Boolean | No | Since TDLib 1.8.24. If true, then a suggestion to gift Telegram Premium needs to be shown in the attachment menu if appropriate |
gift_premium_from_input_field | Boolean | No | Since TDLib 1.8.24. If true, then a suggestion to gift Telegram Premium needs to be shown in the input field if appropriate |
giveaway_additional_chat_count_max | Integer | No | Since TDLib 1.8.24. The maximum number of additional chats that can be added to a giveaway |
giveaway_boost_count_per_premium | Integer | No | Since TDLib 1.8.24. The number of boosts that received by the channel for each giveaway prize |
giveaway_country_count_max | Integer | No | Since TDLib 1.8.24. The maximum number of countries that can be added to a giveaway |
giveaway_duration_max | Integer | No | Since TDLib 1.8.24. The maximum number of additional chats that can be added to a giveaway |
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 |
is_premium | Boolean | No | Since TDLib 1.8.24. If true, then the current user subscribed to Telegram Premium |
is_premium_available | Boolean | No | Since TDLib 1.8.24. If true, then the current user can subscribe to Telegram Premium. Otherwise, all premium-related features must be hidden |
message_caption_length_max | Integer | No | Maximum length of a message caption |
message_reply_quote_length_max | Integer | No | Since TDLib 1.8.24. The maximum length of quote from the replied message |
message_text_length_max | Integer | No | Maximum length of a message text |
monthly_sent_story_count_max | Integer | No | Since TDLib 1.8.24. The maximum number of stories that can be posted per month by the current user |
my_id | Integer | No | Identifier of the current user |
notification_sound_count_max | Integer | No | Since TDLib 1.8.24. The maximum number of saved notification sounds |
notification_sound_duration_max | Integer | No | Since TDLib 1.8.24. The maximum duration of an audio that can be used as a notification sound |
notification_sound_size_max | Integer | No | Since TDLib 1.8.24. The maximum size of the audio file that can be used as a notification sound |
pinned_archived_chat_count_max | Integer | No | Maximum number of pinned cloud chats in the Archive chat list for the current user. 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 for the current user. The same amount of secret chats can be pinned locally |
pinned_forum_topic_count_max | Integer | No | Since TDLib 1.8.24. The maximum number of pinned forum topics |
pinned_saved_messages_topic_count_max | Integer | No | Since TDLib 1.8.24. The maximum number of pinned topics in Saved Messages for the current user |
photo_search_bot_username | String | No | Username of a bot which can be used in inline mode for photos search |
premium_gift_boost_count | Integer | No | Since TDLib 1.8.24. The number of boosts that is obtained by gifting Telegram Premium to another user |
replies_bot_chat_id | Integer | No | Identifier of the @replies bot |
story_caption_length_max | Integer | No | Since TDLib 1.8.24. The maximum length of story caption for the current user |
story_stealth_mode_cooldown_period | Integer | No | Since TDLib 1.8.24. The number of seconds that must pass between before Stealth Mode can be enabled again |
story_stealth_mode_future_period | Integer | No | Since TDLib 1.8.24. The number of seconds in the future the Stealth Mode will last |
story_stealth_mode_past_period | Integer | No | Since TDLib 1.8.24. The number of seconds in the past during which all views of stories from the current user will be hidden if Stealth Mode is enabled |
story_suggested_reaction_area_count_max | Integer | No | Since TDLib 1.8.24. The maximum number of suggested reaction areas that can be added to a story |
story_viewers_expiration_delay | Integer | No | Since TDLib 1.8.24. The number of seconds after story expiration date for which story viewers still can be received |
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. Can be received synchronously. |
weekly_sent_story_count_max | Integer | No | Since TDLib 1.8.24. The maximum number of stories that can be posted per week by the current user |
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.