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 valueDefault valueValue range
Integer064-bit integer
BooleanfalseTrue or false
StringAny Unicode string

List of options supported by TDLib #

Options not mentioned in this list may be safely ignored.

NameTypeWritableDescription
always_parse_markdownBooleanYesIf true, text entities will be automatically parsed in all inputMessageText objects
disable_animated_emojiBooleanYesIf true, animated emoji will be disabled and shown as plain emoji
disable_contact_registered_notificationsBooleanYesIf 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_statisticsBooleanYesSince TDLib 1.8.24. If true, then network statistics will be completely disabled
disable_persistent_network_statisticsBooleanYesIf true, persistent network statistics will be disabled, which significantly reduces disk usage
disable_sent_scheduled_message_notificationsBooleanYesIf true, notifications about outgoing scheduled messages that were sent will be disabled
disable_time_adjustment_protectionBooleanYesIf true, protection from external time adjustment will be disabled, which significantly reduces disk usage
disable_top_chatsBooleanYesIf true, support for top chats and statistics collection is disabled
ignore_background_updatesBooleanYesIf 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_notificationBooleanYesIf true, the disable_notification value specified in the request will be always used instead of the default value
ignore_file_namesBooleanYesSince TDLib 1.8.24. If true, document file names will be ignored and numerical names will be used instead
ignore_inline_thumbnailsBooleanYesIf true, prevents file thumbnails sent by the server along with messages from being saved on the disk
ignore_platform_restrictionsBooleanYesIf true, chat and message restrictions specific to the currently used operating system will be ignored
ignore_sensitive_content_restrictionsBooleanYesIf 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_paid_reaction_anonymousBooleanYesTDLib 1.8.36-1.8.44. If true, added paid reactions are anonymous by default. If false, they are non-anonymous.
language_pack_database_pathStringYesPath 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_idStringYesIdentifier of the currently used language pack from the current localization target
localization_targetStringYesName for the current localization target (for example, “android”, “android_x”, “ios”, “macos”, “tdesktop”, “unigram”, “web”, “webz”)
message_unload_delayIntegerYesThe 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_maxIntegerYesThe maximum number of notification groups to be shown simultaneously, 0-25
notification_group_size_maxIntegerYesThe maximum number of simultaneously shown notifications in a group, 1-25. Defaults to 10
onlineBooleanYesOnline status of the current user
prefer_ipv6BooleanYesIf true, IPv6 addresses will be preferred over IPv4 addresses
process_pinned_messages_as_mentionsBooleanYesSince TDLib 1.8.24. If true, then all pinned messages will be treated as mentions even posted without notification of chat members
use_pfsBooleanYesIf true, Perfect Forward Secrecy will be enabled for interaction with the Telegram servers for cloud chats
use_quick_ackBooleanYesIf true, quick acknowledgement will be enabled for outgoing messages
use_storage_optimizerBooleanYesIf true, the background storage optimizer will be enabled
utc_time_offsetIntegerYesA 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_maxIntegerNoSince TDLib 1.8.24. The maximum number of active stories posted by the current user
added_shareable_chat_folder_count_maxIntegerNoSince TDLib 1.8.24. The maximum number of added shareable chat folders for the current user
added_text_composition_style_count_maxIntegerNoSince TDLib 1.8.65. The maximum number of added custom text composition styles
affiliate_program_commission_per_mille_maxIntegerNoSince TDLib 1.8.41. The maximum commission that can be used for an affiliate program
affiliate_program_commission_per_mille_minIntegerNoSince TDLib 1.8.41. The minimum commission that can be used for an affiliate program
animation_search_bot_usernameStringNoUsername of a bot which can be used in inline mode for animations search
anti_spam_bot_user_idIntegerNoSince TDLib 1.8.24. User identifier of the Telegram Anti-Spam bot
authentication_tokenStringNoAn authentication token to be used on subsequent authorizations
authorization_dateIntegerNoPoint in time (Unix timestamp) when authorization was received
basic_group_size_maxIntegerNoThe maximum number of members in a basic group
bio_length_maxIntegerNoSince TDLib 1.8.24. The maximum allowed length of the current user's bio
bot_media_preview_count_maxIntegerNoSince TDLib 1.8.34. The maximum number of media previews that can be added for a bot
bot_verification_custom_description_length_maxIntegerNoSince TDLib 1.8.42. The maximum length of custom description for verification provided by a third-party organization
business_chat_link_count_maxIntegerNoSince TDLib 1.8.28. The maximum number of created short chat links by a Telegram Business account
business_start_page_message_length_maxIntegerNoSince TDLib 1.8.28. The maximum allowed length of the start page message of a Telegram Business account
business_start_page_title_length_maxIntegerNoSince TDLib 1.8.28. The maximum allowed length of the start page title of a Telegram Business account
call_connect_timeout_msIntegerNoThe maximum time to wait for call connection creation to be passed to tgcalls
call_packet_timeout_msIntegerNoThe maximum time to wait for call packet delivery to be passed to tgcalls
can_accept_callsBooleanNoSince TDLib 1.8.48. If true, the user can accept calls from this device
can_archive_and_mute_new_chats_from_unknown_usersBooleanNoIf true, new chats from unknown users can be automatically archived and muted via archiveChatListSettings
can_enable_paid_messagesBooleanNoSince TDLib 1.8.46. If true, the user can enable paid messages
can_gift_starsBooleanNoSince TDLib 1.8.34. If true, Telegram Stars can be gifted to other users
can_ignore_sensitive_content_restrictionsBooleanNoIf true, the option “ignore_sensitive_content_restrictions” can be changed
can_preload_weatherBooleanNoSince TDLib 1.8.34. If true, the current weather must be preloaded before adding the media area to the story. Otherwise, weather must be loaded only after the user has chosen weather media area.
can_set_new_chat_privacy_settingsBooleanNoSince TDLib 1.8.28. If true, then the current user can change privacy settings for new chats
can_use_login_passkeyBooleanNoSince TDLib 1.8.59. If true, then passkey can be used to log in and new passkeys can be added
can_use_text_entities_in_story_captionBooleanNoSince TDLib 1.8.24. If true, then the current user can use text entities in story captions
can_withdraw_chat_revenueBooleanNoSince TDLib 1.8.28. If true, then revenue from sponsored messages in chats can be withdrawn
channel_bot_user_idIntegerNoIdentifier 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_maxIntegerNoSince TDLib 1.8.24. The maximum number of manually chosen reactions for a chat
chat_boost_level_maxIntegerNoSince TDLib 1.8.24. The maximum boost level available to a chat
chat_folder_chosen_chat_count_maxIntegerNoSince TDLib 1.8.24. The maximum number of always included or excluded chats in a chat folder for the current user
chat_folder_count_maxIntegerNoSince TDLib 1.8.24. The maximum number of chat folders that the current user can have
chat_folder_invite_link_count_maxIntegerNoSince TDLib 1.8.24. The maximum number of shareable chat folders with owned invite links
chat_folder_new_chats_update_periodIntegerNoSince TDLib 1.8.24. The minimum interval between calls to getChatFolderNewChats in shareable chat folders
checklist_task_count_maxIntegerNoSince TDLib 1.8.51. The maximum number of tasks in a checklist
checklist_task_text_length_maxIntegerNoSince TDLib 1.8.51. The maximum length of text of a task in a checklist
checklist_title_length_maxIntegerNoSince TDLib 1.8.51. The maximum length of title of a checklist
commit_hashStringNoSince TDLib 1.8.24. If known, the hash of the source code commit that was used to build TDLib. Can be received synchronously.
community_bot_count_maxIntegerNoSince TDLib 1.8.67. The maximum number of bots that can be added to a community
community_chat_count_maxIntegerNoSince TDLib 1.8.67. The maximum number of supergroups and channels that can be added to a community
direct_channel_message_star_count_defaultIntegerNoSince TDLib 1.8.50. Default value for the price of incoming messages in direct channels
enabled_proxy_idIntegerNoIdentifier of the enabled proxy
expect_blockingBooleanNoIf true, access to Telegram is likely blocked for the user
fact_check_length_maxIntegerNoSince TDLib 1.8.30. The maximum allowed length of a fact-check
favorite_stickers_limitIntegerNoThe maximum number of favorite stickers
forwarded_message_count_maxIntegerNoThe maximum number of forwarded messages per one request
gift_collection_count_maxIntegerNoSince TDLib 1.8.53. The maximum number of gift collections
gift_collection_size_maxIntegerNoSince TDLib 1.8.54. The maximum number of gifts in a gift collection
gift_premium_from_attachment_menuBooleanNoSince 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_fieldBooleanNoSince TDLib 1.8.24. If true, then a suggestion to gift Telegram Premium needs to be shown in the input field if appropriate
gift_resale_earnings_per_milleIntegerNoTDLib 1.8.49-1.8.52. The amount of Telegram Stars received by the user for each 1000 Telegram Stars paid for gifts bought from them
gift_resale_gram_cent_count_maxIntegerNoSince TDLib 1.8.65. The maximum price in 1/100 of TON Gram for a gift that is available for resale
gift_resale_gram_cent_count_minIntegerNoSince TDLib 1.8.65. The minimum price in 1/100 of TON Gram for a gift that is available for resale
gift_resale_gram_earnings_per_milleIntegerNoSince TDLib 1.8.65. The amount of TON Grams received by the user for each 1000 Grams paid for gifts bought from them
gift_resale_star_count_maxIntegerNoSince TDLib 1.8.49. The maximum price in Telegram Stars for a gift that is available for resale
gift_resale_star_count_minIntegerNoSince TDLib 1.8.49. The minimum price in Telegram Stars for a gift that is available for resale
gift_resale_star_earnings_per_milleIntegerNoSince TDLib 1.8.53. The amount of Telegram Stars received by the user for each 1000 Telegram Stars paid for gifts bought from them
gift_resale_toncoin_cent_count_maxIntegerNoTDLib 1.8.53-1.8.64. The maximum price in 1/100 of TON Gram for a gift that is available for resale
gift_resale_toncoin_cent_count_minIntegerNoTDLib 1.8.53-1.8.64. The minimum price in 1/100 of TON Gram for a gift that is available for resale
gift_resale_toncoin_earnings_per_milleIntegerNoTDLib 1.8.53-1.8.64. The amount of TON Grams received by the user for each 1000 Grams paid for gifts bought from them
gift_sell_periodIntegerNoSince TDLib 1.8.38. The number of seconds after gift receiving for which it can be sold for Telegram Stars
gift_text_length_maxIntegerNoSince TDLib 1.8.37. The maximum length of a message added to a sent gift
giveaway_additional_chat_count_maxIntegerNoSince TDLib 1.8.24. The maximum number of additional chats that can be added to a giveaway
giveaway_boost_count_per_premiumIntegerNoSince TDLib 1.8.24. The number of boosts that received by the channel for each giveaway prize
giveaway_country_count_maxIntegerNoSince TDLib 1.8.24. The maximum number of countries that can be added to a giveaway
giveaway_duration_maxIntegerNoSince TDLib 1.8.24. The maximum number of additional chats that can be added to a giveaway
gram_top_up_urlStringNoSince TDLib 1.8.65. The URL that can be used to top up TON Gram balance of the current user
group_anonymous_bot_user_idIntegerNoIdentifier of the bot which is shown as the sender of anonymous messages in groups when viewed from an outdated client
group_call_message_text_length_maxIntegerNoSince TDLib 1.8.56. The maximum length of a message text in a group call that isn't a live story
group_call_participant_count_maxIntegerNoSince TDLib 1.8.48. The maximum number of participants in a group call that is not bound to a chat
is_premiumBooleanNoSince TDLib 1.8.24. If true, then the current user subscribed to Telegram Premium
is_premium_availableBooleanNoSince TDLib 1.8.24. If true, then the current user can subscribe to Telegram Premium. Otherwise, all premium-related features must be hidden
login_passkey_count_maxIntegerNoSince TDLib 1.8.59. The maximum number of login passkeys that can be added
message_caption_length_maxIntegerNoThe maximum length of a message caption
message_reply_quote_length_maxIntegerNoSince TDLib 1.8.24. The maximum length of quote from the replied message
message_text_length_maxIntegerNoThe maximum length of a message text
million_gram_to_usd_rateIntegerNoSince TDLib 1.8.65. The number of US dollars that can be received by selling 1000000 TON Grams on a third-party exchange
million_toncoin_to_usd_rateIntegerNoTDLib 1.8.52-1.8.64. The number of US dollars that can be received by selling 1000000 TON Grams on a third-party exchange
monthly_sent_story_count_maxIntegerNoSince TDLib 1.8.24. The maximum number of stories that can be posted per month by the current user
my_idIntegerNoIdentifier of the current user
notification_sound_count_maxIntegerNoSince TDLib 1.8.24. The maximum number of saved notification sounds
notification_sound_duration_maxIntegerNoSince TDLib 1.8.24. The maximum duration of an audio that can be used as a notification sound
notification_sound_size_maxIntegerNoSince TDLib 1.8.24. The maximum size of the audio file that can be used as a notification sound
owned_bot_count_maxIntegerNoSince TDLib 1.8.63. The maximum number of bots that can be owned by the current user
paid_group_call_message_star_count_maxIntegerNoSince TDLib 1.8.57. The maximum number of Telegram Stars that can be set as the price for paid group call messages
paid_media_message_star_count_maxIntegerNoSince TDLib 1.8.32. The maximum price of a paid post in Telegram Stars
paid_message_earnings_per_milleIntegerNoSince TDLib 1.8.46. The amount of Telegram Stars received by the user or the supergroup for each 1000 Telegram Stars paid for their incoming messages
paid_message_star_count_maxIntegerNoSince TDLib 1.8.46. The maximum number of Telegram Stars that can be set as the price for paid messages
paid_reaction_star_count_maxIntegerNoSince TDLib 1.8.35. The maximum number of Telegram Stars that can be added as paid reaction to a message in one request
pending_text_message_periodIntegerNoSince TDLib 1.8.56. The maximum number of seconds to show a pending message from a bot
photo_search_bot_usernameStringNoUsername of a bot which can be used in inline mode for photos search
pinned_archived_chat_count_maxIntegerNoThe 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_maxIntegerNoThe 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_maxIntegerNoSince TDLib 1.8.24. The maximum number of pinned forum topics
pinned_gift_count_maxIntegerNoSince TDLib 1.8.46. The maximum number of pinned unique gifts
pinned_saved_messages_topic_count_maxIntegerNoSince TDLib 1.8.24. The maximum number of pinned topics in Saved Messages for the current user
pinned_story_count_maxIntegerNoSince TDLib 1.8.29. The maximum number of pinned stories on a chat page
poll_answer_count_maxIntegerNoSince TDLib 1.8.50. The maximum number of options in a poll message
poll_country_count_maxIntegerNoSince TDLib 1.8.63. The maximum number of countries for which a poll can be restricted
poll_open_period_maxIntegerNoSince TDLib 1.8.63. The maximum amount of time after which the poll may be automatically closed; in seconds
premium_download_speedupIntegerNoSince TDLib 1.8.28. Approximate number of times file download speed will increase if the user subscribes to Telegram Premium
premium_gift_boost_countIntegerNoSince TDLib 1.8.24. The number of boosts that is obtained by gifting Telegram Premium to another user
premium_upload_speedupIntegerNoSince TDLib 1.8.28. Approximate number of times file upload speed will increase if the user subscribes to Telegram Premium
quick_reply_shortcut_count_maxIntegerNoSince TDLib 1.8.28. The maximum number of quick reply shortcuts that can be created by a Telegram Business account
quick_reply_shortcut_message_count_maxIntegerNoSince TDLib 1.8.28. The maximum number of messages that can be added to a quick reply shortcut by a Telegram Business account
replies_bot_chat_idIntegerNoIdentifier of the @replies bot
rich_message_block_count_maxIntegerNoSince TDLib 1.8.65. The maximum number of blocks in a rich message
rich_message_depth_maxIntegerNoSince TDLib 1.8.65. The maximum depth of nested blocks in a rich message
rich_message_media_count_maxIntegerNoSince TDLib 1.8.65. The maximum number of media files in a rich message
rich_message_table_column_count_maxIntegerNoSince TDLib 1.8.65. The maximum number of columns in a table of a rich message
rich_message_text_length_maxIntegerNoSince TDLib 1.8.65. The maximum length of a rich message text
show_message_edit_date_by_defaultBooleanNoIf true, then message edit date must be shown along the message instead of the message send date
stake_dice_stake_amount_maxIntegerNoSince TDLib 1.8.60. The maximum amount of TON Grams that can be staked for a roll in nanograms
stake_dice_stake_amount_minIntegerNoSince TDLib 1.8.60. The minimum amount of TON Grams that can be staked for a roll in nanograms
star_withdrawal_count_maxIntegerNoSince TDLib 1.8.52. The maximum number of Telegram Stars that can be withdrawn
star_withdrawal_count_minIntegerNoSince TDLib 1.8.31. The minimum number of Telegram Stars that can be withdrawn
story_album_count_maxIntegerNoSince TDLib 1.8.53. The maximum number of story albums
story_album_size_maxIntegerNoSince TDLib 1.8.54. The maximum number of stories in a story album
story_caption_length_maxIntegerNoSince TDLib 1.8.24. The maximum length of story caption for the current user
story_link_area_count_maxIntegerNoSince TDLib 1.8.31. The maximum number of link areas that can be added to a story by Telegram Premium users
story_stealth_mode_cooldown_periodIntegerNoSince TDLib 1.8.24. The number of seconds that must pass between before Stealth Mode can be enabled again
story_stealth_mode_future_periodIntegerNoSince TDLib 1.8.24. The number of seconds in the future the Stealth Mode will last
story_stealth_mode_past_periodIntegerNoSince 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_maxIntegerNoSince TDLib 1.8.24. The maximum number of suggested reaction areas that can be added to a story
story_viewers_expiration_delayIntegerNoSince TDLib 1.8.24. The number of seconds after story expiration date for which story viewers still can be received
subscription_star_count_maxIntegerNoSince TDLib 1.8.35. The maximum number of Telegram Stars that can be asked for monthly subscription to a chat
suggested_language_pack_idStringNoIdentifier of the language pack, suggested for the user by the server
suggested_post_gram_cent_count_maxIntegerNoSince TDLib 1.8.65. The maximum price of a suggested post in TON Gram cents
suggested_post_gram_cent_count_minIntegerNoSince TDLib 1.8.65. The minimum price of a suggested post in TON Gram cents
suggested_post_gram_earnings_per_milleIntegerNoSince TDLib 1.8.65. The amount of TON Grams received by a channel for each 1000 Grams paid for suggested post publication in the channel
suggested_post_lifetime_minIntegerNoSince TDLib 1.8.52. The minimum amount of time for which a suggested post must be published in a channel to receive payment for the post; in seconds
suggested_post_send_delay_maxIntegerNoSince TDLib 1.8.52. The maximum delay for suggested post publish date; in seconds
suggested_post_send_delay_minIntegerNoSince TDLib 1.8.52. The minimum delay for suggested post publish date; in seconds
suggested_post_star_count_maxIntegerNoSince TDLib 1.8.52. The maximum price of a suggested post in Telegram Stars
suggested_post_star_count_minIntegerNoSince TDLib 1.8.52. The minimum price of a suggested post in Telegram Stars
suggested_post_star_earnings_per_milleIntegerNoSince TDLib 1.8.52. The amount of Telegram Stars received by a channel for each 1000 Telegram Stars paid for suggested post publication in the channel
suggested_post_toncoin_cent_count_maxIntegerNoTDLib 1.8.52-1.8.64. The maximum price of a suggested post in TON Gram cents
suggested_post_toncoin_cent_count_minIntegerNoTDLib 1.8.52-1.8.64. The minimum price of a suggested post in TON Gram cents
suggested_post_toncoin_earnings_per_milleIntegerNoTDLib 1.8.52-1.8.64. The amount of TON Grams received by a channel for each 1000 Grams paid for suggested post publication in the channel
suggested_video_note_audio_bitrateIntegerNoSuggested bit rate for audio encoding in video notes, in kbit/s
suggested_video_note_lengthIntegerNoSuggested width and height of the video in video notes
suggested_video_note_video_bitrateIntegerNoSuggested bit rate for video encoding in video notes, in kbit/s
supergroup_size_maxIntegerNoThe maximum number of members in a supergroup
t_me_urlStringNoCurrent value of t.me URL, i.e. https://t.me/
telegram_service_notifications_chat_idIntegerNoIdentifier of the Telegram Service Notifications chat
test_modeBooleanNoIf true, the test environment is being used instead of the production environment
text_composition_style_example_countIntegerNoSince TDLib 1.8.64. The number of examples that are available for each text composition style
text_composition_style_prompt_length_maxIntegerNoSince TDLib 1.8.64. The maximum allowed length of the text composition style prompt
text_composition_style_title_length_maxIntegerNoSince TDLib 1.8.64. The maximum allowed length of the text composition style title
thousand_star_to_usd_rateIntegerNoSince TDLib 1.8.35. The number of US dollars that can be received by withdrawing 1000 Telegram Stars
ton_blockchain_explorer_urlStringNoSince TDLib 1.8.45. A prefix of the URL that can be used to get information about a TON blockchain address
toncoin_top_up_urlStringNoTDLib 1.8.52-1.8.64. The URL that can be used to top up TON Gram balance of the current user
unix_timeIntegerNoAn 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
usd_to_thousand_star_rateIntegerNoSince TDLib 1.8.35. The number of US dollars needed to buy 1000 Telegram Stars
user_note_text_length_maxIntegerNoSince TDLib 1.8.56. The maximum length of text of a user note
venue_search_bot_usernameStringNoUsername of a bot which can be used in inline mode for venues search
verification_codes_bot_chat_idIntegerNoSince TDLib 1.8.37. Identifier of the Verification Codes chat with codes from Telegram Gateway
versionStringNoTDLib version. This options is guaranteed to come before all other updates. Can be received synchronously.
web_app_allowed_protocolsStringNoSince TDLib 1.8.32. A space-separated list of URL protocols that are allowed to be open by the call to web_app_open_link from Web Apps.
weekly_sent_story_count_maxIntegerNoSince TDLib 1.8.24. The maximum number of stories that can be posted per week by the current user
welcome_message_count_maxIntegerNoSince TDLib 1.8.67. The maximum number of welcome messages that can be added for a chat

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.