- public async Ok accept_call (int32 call_id, CallProtocol protocol) throws TDLibError
Accepts an incoming call
- public async Ok accept_terms_of_service (string terms_of_service_id) throws TDLibError
Accepts Telegram terms of services
- public async Ok activate_story_stealth_mode () throws TDLibError
Activates stealth mode for stories, which hides all views of stories
from the current user in the last "story_stealth_mode_past_period" seconds and for the next "story_stealth_mode_future_period"
seconds; for Telegram Premium users only
- public async BotMediaPreview add_bot_media_preview (int64 bot_user_id, string language_code, InputStoryContent content) throws TDLibError
Adds a new media preview to the beginning of the list of media
previews of a bot. Returns the added preview after addition is completed server-side. The total number of previews must not exceed
getOption("bot_media_preview_count_max") for the given language
- public async Ok add_chat_folder_by_invite_link (string invite_link, ArrayList<int64?> chat_ids) throws TDLibError
Adds a chat folder by an invite link
- public async FailedToAddMembers add_chat_member (int64 chat_id, int64 user_id, int32 forward_limit) throws TDLibError
Adds a new member to a chat; requires can_invite_users member right.
Members can't be added to private or secret chats. Returns information about members that weren't added
- public async FailedToAddMembers add_chat_members (int64 chat_id, ArrayList<int64?> user_ids) throws TDLibError
Adds multiple new members to a chat; requires can_invite_users member
right. Currently, this method is only available for supergroups and channels. This method can't be used to join a chat. Members can't
be added to a channel if it has more than 200 members. Returns information about members that weren't added
- public async Ok add_chat_to_list (int64 chat_id, ChatList chat_list) throws TDLibError
Adds a chat to a chat list. A chat can't be simultaneously in Main and
Archive chat lists, so it is automatically removed from another one if needed
- public async Ok add_contact (Contact contact, bool share_phone_number) throws TDLibError
Adds a user to the contact list or edits an existing contact by their
user identifier
- public async Ok add_custom_server_language_pack (string language_pack_id) throws TDLibError
Adds a custom server language pack to the list of installed language
packs in current localization target. Can be called before authorization
- public async Ok add_favorite_sticker (InputFile sticker) throws TDLibError
Adds a new sticker to the list of favorite stickers. The new sticker
is added to the top of the list. If the sticker was already in the list, it is removed from the list first. Only stickers belonging to
a sticker set or in WEBP or WEBM format can be added to this list. Emoji stickers can't be added to favorite stickers
- public async File add_file_to_downloads (int32 file_id, int64 chat_id, int64 message_id, int32 priority) throws TDLibError
Adds a file from a message to the list of file downloads. Download
progress and completion of the download will be notified through updateFile updates. If message database is used, the list of file
downloads is persistent across application restarts. The downloading is independent of download using
Client.download_file i.e. it continues if
Client.download_file is canceled or is used to download a part of the
file
- public async Message add_local_message (int64 chat_id, MessageSender sender_id, InputMessageReplyTo reply_to, bool disable_notification, InputMessageContent input_message_content) throws TDLibError
Adds a local message to a chat. The message is persistent across
application restarts only if the message database is used. Returns the added message
- public async Ok add_log_message (int32 verbosity_level, string text) throws TDLibError
Adds a message to TDLib internal log. Can be called synchronously
- public Ok add_log_message_sync (int32 verbosity_level, string text) throws TDLibError
Adds a message to TDLib internal log. Can be called synchronously
- public async Ok add_message_reaction (int64 chat_id, int64 message_id, ReactionType reaction_type, bool is_big, bool update_recent_reactions) throws TDLibError
- public async Ok add_network_statistics (NetworkStatisticsEntry entry) throws TDLibError
Adds the specified data to data usage statistics. Can be called before
authorization
- public async Ok add_pending_paid_message_reaction (int64 chat_id, int64 message_id, int64 star_count, PaidReactionType type_) throws TDLibError
- public async Proxy add_proxy (string server, int32 port, bool enable, ProxyType type_) throws TDLibError
Adds a proxy server for network requests. Can be called before
authorization
- public async QuickReplyMessage add_quick_reply_shortcut_inline_query_result_message (string shortcut_name, int64 reply_to_message_id, int64 query_id, string result_id, bool hide_via_bot) throws TDLibError
Adds a message to a quick reply shortcut via inline bot. If shortcut
doesn't exist and there are less than getOption("quick_reply_shortcut_count_max") shortcuts, then a new shortcut is created. The
shortcut must not contain more than getOption("quick_reply_shortcut_message_count_max") messages after adding the new message. Returns
the added message
- public async QuickReplyMessage add_quick_reply_shortcut_message (string shortcut_name, int64 reply_to_message_id, InputMessageContent input_message_content) throws TDLibError
Adds a message to a quick reply shortcut. If shortcut doesn't exist
and there are less than getOption("quick_reply_shortcut_count_max") shortcuts, then a new shortcut is created. The shortcut must not
contain more than getOption("quick_reply_shortcut_message_count_max") messages after adding the new message. Returns the added message
- public async QuickReplyMessages add_quick_reply_shortcut_message_album (string shortcut_name, int64 reply_to_message_id, ArrayList<InputMessageContent?> input_message_contents) throws TDLibError
Adds 2-10 messages grouped together into an album to a quick reply
shortcut. Currently, only audio, document, photo and video messages can be grouped into an album. Documents and audio files can be
only grouped in an album with messages of the same type. Returns sent messages
- public async Stickers add_recent_sticker (bool is_attached, InputFile sticker) throws TDLibError
Manually adds a new sticker to the list of recently used stickers. The
new sticker is added to the top of the list. If the sticker was already in the list, it is removed from the list first. Only stickers
belonging to a sticker set or in WEBP or WEBM format can be added to this list. Emoji stickers can't be added to recent stickers
- public async Ok add_recently_found_chat (int64 chat_id) throws TDLibError
Adds a chat to the list of recently found chats. The chat is added to
the beginning of the list. If the chat is already in the list, it will be removed from the list first
- public async Ok add_saved_animation (InputFile animation) throws TDLibError
Manually adds a new animation to the list of saved animations. The new
animation is added to the beginning of the list. If the animation was already in the list, it is removed first. Only non-secret video
animations with MIME type "video/mp4" can be added to the list
- public async NotificationSound add_saved_notification_sound (InputFile sound) throws TDLibError
Adds a new notification sound to the list of saved notification
sounds. The new notification sound is added to the top of the list. If it is already in the list, its position isn't changed
- public async Ok add_sticker_to_set (int64 user_id, string name, InputSticker sticker) throws TDLibError
Adds a new sticker to a set
- public async Ok allow_bot_to_send_messages (int64 bot_user_id) throws TDLibError
Allows the specified bot to send messages to the user
- public async Ok allow_unpaid_messages_from_user (int64 user_id, bool refund_payments) throws TDLibError
Allows the specified user to send unpaid private messages to the
current user by adding a rule to userPrivacySettingAllowUnpaidMessages
- public async Ok answer_callback_query (int64 callback_query_id, string text, bool show_alert, string url, int32 cache_time) throws TDLibError
Sets the result of a callback query; for bots only
- public async Ok answer_custom_query (int64 custom_query_id, string data) throws TDLibError
Answers a custom query; for bots only
- public async Ok answer_inline_query (int64 inline_query_id, bool is_personal, InlineQueryResultsButton button, ArrayList<InputInlineQueryResult?> results, int32 cache_time, string next_offset) throws TDLibError
Sets the result of an inline query; for bots only
- public async Ok answer_pre_checkout_query (int64 pre_checkout_query_id, string error_message) throws TDLibError
Sets the result of a pre-checkout query; for bots only
- public async Ok answer_shipping_query (int64 shipping_query_id, ArrayList<ShippingOption?> shipping_options, string error_message) throws TDLibError
Sets the result of a shipping query; for bots only
- public async SentWebAppMessage answer_web_app_query (string web_app_query_id, InputInlineQueryResult result) throws TDLibError
Sets the result of interaction with a Web App and sends corresponding
message on behalf of the user to the chat from which the query originated; for bots only
- public async Ok apply_premium_gift_code (string code) throws TDLibError
Applies a Telegram Premium gift code
- public async Ok assign_store_transaction (StoreTransaction transaction, StorePaymentPurpose purpose) throws TDLibError
Informs server about an in-store purchase. For official applications
only
- public async Ok ban_chat_member (int64 chat_id, MessageSender member_id, int32 banned_until_date, bool revoke_messages) throws TDLibError
Bans a member in a chat; requires can_restrict_members administrator
right. Members can't be banned in private or secret chats. In supergroups and channels, the user will not be able to return to the
group on their own using invite links, etc., unless unbanned first
- public async Ok ban_group_call_participants (int32 group_call_id, ArrayList<int64?> user_ids) throws TDLibError
Bans users from a group call not bound to a chat; requires
groupCall.is_owned. Only the owner of the group call can invite the banned users back
- public async Ok block_message_sender_from_replies (int64 message_id, bool delete_message, bool delete_all_messages, bool report_spam) throws TDLibError
Blocks an original sender of a message in the Replies chat
- public async ChatBoostSlots boost_chat (int64 chat_id, ArrayList<int32?> slot_ids) throws TDLibError
Boosts a chat and returns the list of available chat boost slots for
the current user after the boost
- public async Ok can_bot_send_messages (int64 bot_user_id) throws TDLibError
Checks whether the specified bot can send messages to the user.
Returns a 404 error if can't and the access can be granted by call to
Client.allow_bot_to_send_messages
- public async CanPostStoryResult can_post_story (int64 chat_id) throws TDLibError
Checks whether the current user can post a story on behalf of a chat;
requires can_post_stories right for supergroup and channel chats
- public async Ok can_purchase_from_store (StorePaymentPurpose purpose) throws TDLibError
Checks whether an in-store purchase is possible. Must be called before
any in-store purchase. For official applications only
- public async CanSendMessageToUserResult can_send_message_to_user (int64 user_id, bool only_local) throws TDLibError
Check whether the current user can message another user or try to
create a chat with them
- public async CanTransferOwnershipResult can_transfer_ownership () throws TDLibError
Checks whether the current session can be used to transfer a chat
ownership to another user
- public async Ok cancel_download_file (int32 file_id, bool only_if_pending) throws TDLibError
Stops the downloading of a file. If a file has already been
downloaded, does nothing
- public async Ok cancel_password_reset () throws TDLibError
Cancels reset of 2-step verification password. The method can be
called if passwordState.pending_reset_date > 0
- public async Ok cancel_preliminary_upload_file (int32 file_id) throws TDLibError
- public async PasswordState cancel_recovery_email_address_verification () throws TDLibError
Cancels verification of the 2-step verification recovery email address
- public async ImportedContacts change_imported_contacts (ArrayList<Contact?> contacts) throws TDLibError
Changes imported contacts using the list of contacts saved on the
device. Imports newly added contacts and, if at least the file database is enabled, deletes recently deleted contacts. Query result
depends on the result of the previous query, so only one query is possible at the same time
- public async Ok change_sticker_set (int64 set_id, bool is_installed, bool is_archived) throws TDLibError
Installs/uninstalls or activates/archives a sticker set
- public async Ok check_authentication_bot_token (string token) throws TDLibError
- public async Ok check_authentication_code (string code) throws TDLibError
Checks the authentication code. Works only when the current
authorization state is authorizationStateWaitCode
- public async Ok check_authentication_email_code (EmailAddressAuthentication code) throws TDLibError
Checks the authentication of an email address. Works only when the
current authorization state is authorizationStateWaitEmailCode
- public async Ok check_authentication_password (string password) throws TDLibError
Checks the 2-step verification password for correctness. Works only
when the current authorization state is authorizationStateWaitPassword
- public async Ok check_authentication_password_recovery_code (string recovery_code) throws TDLibError
Checks whether a 2-step verification password recovery code sent to an
email address is valid. Works only when the current authorization state is authorizationStateWaitPassword
- public async Ok check_authentication_premium_purchase (string currency, int64 amount) throws TDLibError
Checks whether an in-store purchase of Telegram Premium is possible
before authorization. Works only when the current authorization state is authorizationStateWaitPremiumPurchase
- public async ChatFolderInviteLinkInfo check_chat_folder_invite_link (string invite_link) throws TDLibError
Checks the validity of an invite link for a chat folder and returns
information about the corresponding chat folder
- public async ChatInviteLinkInfo check_chat_invite_link (string invite_link) throws TDLibError
Checks the validity of an invite link for a chat and returns
information about the corresponding chat
- public async CheckChatUsernameResult check_chat_username (int64 chat_id, string username) throws TDLibError
Checks whether a username can be set for a chat
- public async Ok check_created_public_chats_limit (PublicChatType type_) throws TDLibError
Checks whether the maximum number of owned public chats has been
reached. Returns corresponding error if the limit was reached. The limit can be increased with Telegram Premium
- public async Ok check_email_address_verification_code (string code) throws TDLibError
Checks the email address verification code for Telegram Passport
- public async Ok check_login_email_address_code (EmailAddressAuthentication code) throws TDLibError
Checks the login email address authentication
- public async Ok check_password_recovery_code (string recovery_code) throws TDLibError
Checks whether a 2-step verification password recovery code sent to an
email address is valid
- public async Ok check_phone_number_code (string code) throws TDLibError
Check the authentication code and completes the request for which the
code was sent if appropriate
- public async PremiumGiftCodeInfo check_premium_gift_code (string code) throws TDLibError
Return information about a Telegram Premium gift code
- public async Ok check_quick_reply_shortcut_name (string name) throws TDLibError
Checks validness of a name for a quick reply shortcut. Can be called
synchronously
- public Ok check_quick_reply_shortcut_name_sync (string name) throws TDLibError
Checks validness of a name for a quick reply shortcut. Can be called
synchronously
- public async PasswordState check_recovery_email_address_code (string code) throws TDLibError
Checks the 2-step verification recovery email address verification
code
- public async CheckStickerSetNameResult check_sticker_set_name (string name) throws TDLibError
Checks whether a name can be used for a new sticker set
- public async Ok check_web_app_file_download (int64 bot_user_id, string file_name, string url) throws TDLibError
Checks whether a file can be downloaded and saved locally by Web App
request
- public async Text clean_file_name (string file_name) throws TDLibError
Removes potentially dangerous characters from the name of a file.
Returns an empty string on failure. Can be called synchronously
- public Text clean_file_name_sync (string file_name) throws TDLibError
Removes potentially dangerous characters from the name of a file.
Returns an empty string on failure. Can be called synchronously
- public async Ok clear_all_draft_messages (bool exclude_secret_chats) throws TDLibError
Clears message drafts in all chats
- public async Ok clear_autosave_settings_exceptions () throws TDLibError
Clears the list of all autosave settings exceptions. The method is
guaranteed to work only after at least one call to
Client.get_autosave_settings
- public async Ok clear_imported_contacts () throws TDLibError
Clears all imported contacts, contact list remains unchanged
- public async Ok clear_recent_emoji_statuses () throws TDLibError
Clears the list of recently used emoji statuses for self status
- public async Ok clear_recent_reactions () throws TDLibError
Clears the list of recently used reactions
- public async Ok clear_recent_stickers (bool is_attached) throws TDLibError
Clears the list of recently used stickers
- public async Ok clear_recently_found_chats () throws TDLibError
Clears the list of recently found chats
- public async Ok clear_searched_for_tags (bool clear_cashtags) throws TDLibError
Clears the list of recently searched for hashtags or cashtags
- public async Sticker click_animated_emoji_message (int64 chat_id, int64 message_id) throws TDLibError
Informs TDLib that a message with an animated emoji was clicked by the
user. Returns a big animated sticker to be played or a 404 error if usual animation needs to be played
- public async Ok click_chat_sponsored_message (int64 chat_id, int64 message_id, bool is_media_click, bool from_fullscreen) throws TDLibError
Informs TDLib that the user opened the sponsored chat via the button,
the name, the chat photo, a mention in the sponsored message text, or the media in the sponsored message
- public async Ok click_premium_subscription_button () throws TDLibError
Informs TDLib that the user clicked Premium subscription button on the
Premium features screen
- public async Ok close () throws TDLibError
Closes the TDLib instance. All databases will be flushed to disk and
properly closed. After the Client.close completes, updateAuthorizationState with authorizationStateClosed
will be sent. Can be called before initialization
- public async Ok close_chat (int64 chat_id) throws TDLibError
Informs TDLib that the chat is closed by the user. Many useful
activities depend on the chat being opened or closed
- public async Ok close_secret_chat (int32 secret_chat_id) throws TDLibError
Closes a secret chat, effectively transferring its state to
secretChatStateClosed
- public async Ok close_story (int64 story_poster_chat_id, int32 story_id) throws TDLibError
Informs TDLib that a story is closed by the user
- public async Ok close_web_app (int64 web_app_launch_id) throws TDLibError
Informs TDLib that a previously opened Web App was closed
- public async Ok commit_pending_paid_message_reactions (int64 chat_id, int64 message_id) throws TDLibError
Applies all pending paid reactions on a message
- public async Session confirm_qr_code_authentication (string link) throws TDLibError
Confirms QR code authentication on another device. Returns created
session on success
- public async Ok confirm_session (int64 session_id) throws TDLibError
Confirms an unconfirmed session of the current user from another
device
- public async ConnectedAffiliateProgram connect_affiliate_program (AffiliateType affiliate, int64 bot_user_id) throws TDLibError
Connects an affiliate program to the given affiliate. Returns
information about the connected affiliate program
- public async Chat create_basic_group_chat (int64 basic_group_id, bool force) throws TDLibError
Returns an existing chat corresponding to a known basic group
- public async BusinessChatLink create_business_chat_link (InputBusinessChatLink link_info) throws TDLibError
Creates a business chat link for the current account. Requires
Telegram Business subscription. There can be up to getOption("business_chat_link_count_max") links created. Returns the created link
- public async CallId create_call (int64 user_id, CallProtocol protocol, bool is_video) throws TDLibError
Creates a new call
- public async ChatFolderInfo create_chat_folder (ChatFolder folder) throws TDLibError
Creates new chat folder. Returns information about the created chat
folder. There can be up to getOption("chat_folder_count_max") chat folders, but the limit can be increased with Telegram Premium
- public async ChatFolderInviteLink create_chat_folder_invite_link (int32 chat_folder_id, string name, ArrayList<int64?> chat_ids) throws TDLibError
Creates a new invite link for a chat folder. A link can be created for
a chat folder if it has only pinned and included chats
- public async ChatInviteLink create_chat_invite_link (int64 chat_id, string name, int32 expiration_date, int32 member_limit, bool creates_join_request) throws TDLibError
Creates a new invite link for a chat. Available for basic groups,
supergroups, and channels. Requires administrator privileges and can_invite_users right in the chat
- public async ChatInviteLink create_chat_subscription_invite_link (int64 chat_id, string name, StarSubscriptionPricing subscription_pricing) throws TDLibError
Creates a new subscription invite link for a channel chat. Requires
can_invite_users right in the chat
- public async ForumTopicInfo create_forum_topic (int64 chat_id, string name, ForumTopicIcon icon) throws TDLibError
Creates a topic in a forum supergroup chat; requires can_manage_topics
administrator or can_create_topics member right in the supergroup
- public async GroupCallInfo create_group_call (GroupCallJoinParameters join_parameters) throws TDLibError
Creates a new group call that isn't bound to a chat
- public async HttpUrl create_invoice_link (string business_connection_id, InputMessageContent invoice) throws TDLibError
Creates a link for the given invoice; for bots only
- public async CreatedBasicGroupChat create_new_basic_group_chat (ArrayList<int64?> user_ids, string title, int32 message_auto_delete_time) throws TDLibError
Creates a new basic group and sends a corresponding
messageBasicGroupChatCreate. Returns information about the newly created chat
- public async Chat create_new_secret_chat (int64 user_id) throws TDLibError
Creates a new secret chat. Returns the newly created chat
- public async StickerSet create_new_sticker_set (int64 user_id, string title, string name, StickerType sticker_type, bool needs_repainting, ArrayList<InputSticker?> stickers, string source) throws TDLibError
Creates a new sticker set. Returns the newly created sticker set
- public async Chat create_new_supergroup_chat (string title, bool is_forum, bool is_channel, string description, ChatLocation location, int32 message_auto_delete_time, bool for_import) throws TDLibError
Creates a new supergroup or channel and sends a corresponding
messageSupergroupChatCreate. Returns the newly created chat
- public async Chat create_private_chat (int64 user_id, bool force) throws TDLibError
Returns an existing chat corresponding to a given user
- public async Chat create_secret_chat (int32 secret_chat_id) throws TDLibError
Returns an existing chat corresponding to a known secret chat
- public async Chat create_supergroup_chat (int64 supergroup_id, bool force) throws TDLibError
Returns an existing chat corresponding to a known supergroup or
channel
- public async TemporaryPasswordState create_temporary_password (string password, int32 valid_for) throws TDLibError
Creates a new temporary password for processing payments
- public async GroupCallId create_video_chat (int64 chat_id, string title, int32 start_date, bool is_rtmp_stream) throws TDLibError
Creates a video chat (a group call bound to a chat). Available only
for basic groups, supergroups and channels; requires can_manage_video_chats administrator right
- public async Ok decline_group_call_invitation (int64 chat_id, int64 message_id) throws TDLibError
Declines an invitation to an active group call via messageGroupCall.
Can be called both by the sender and the receiver of the invitation
- public async Data decrypt_group_call_data (int32 group_call_id, MessageSender participant_id, GroupCallDataChannel data_channel, Bytes data) throws TDLibError
Decrypts group call data received by tgcalls
- public async Ok delete_account (string reason, string password) throws TDLibError
Deletes the account of the current user, deleting all information
associated with the user from the server. The phone number of the account can be used to create a new account. Can be called before
authorization when the current authorization state is authorizationStateWaitPassword
- public async Ok delete_all_call_messages (bool revoke) throws TDLibError
Deletes all call messages
- public async Ok delete_all_revoked_chat_invite_links (int64 chat_id, int64 creator_user_id) throws TDLibError
Deletes all revoked chat invite links created by a given chat
administrator. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other
links
- public async Ok delete_bot_media_previews (int64 bot_user_id, string language_code, ArrayList<int32?> file_ids) throws TDLibError
Delete media previews from the list of media previews of a bot
- public async Ok delete_business_chat_link (string link) throws TDLibError
Deletes a business chat link of the current account
- public async Ok delete_business_connected_bot (int64 bot_user_id) throws TDLibError
Deletes the business bot that is connected to the current user account
- public async Ok delete_business_messages (string business_connection_id, ArrayList<int64?> message_ids) throws TDLibError
Deletes messages on behalf of a business account; for bots only
- public async Ok delete_business_story (string business_connection_id, int32 story_id) throws TDLibError
Deletes a story posted by the bot on behalf of a business account; for
bots only
- public async Ok delete_chat (int64 chat_id) throws TDLibError
Deletes a chat along with all messages in the corresponding chat for
all chat members. For group chats this will release the usernames and remove all members. Use the field
chat.can_be_deleted_for_all_users to find whether the method can be applied to the chat
- public async Ok delete_chat_background (int64 chat_id, bool restore_previous) throws TDLibError
Deletes background in a specific chat
- public async Ok delete_chat_folder (int32 chat_folder_id, ArrayList<int64?> leave_chat_ids) throws TDLibError
Deletes existing chat folder
- public async Ok delete_chat_folder_invite_link (int32 chat_folder_id, string invite_link) throws TDLibError
Deletes an invite link for a chat folder
- public async Ok delete_chat_history (int64 chat_id, bool remove_from_chat_list, bool revoke) throws TDLibError
Deletes all messages in the chat. Use
chat.can_be_deleted_only_for_self and chat.can_be_deleted_for_all_users fields to find whether and how the method can be applied to
the chat
- public async Ok delete_chat_messages_by_date (int64 chat_id, int32 min_date, int32 max_date, bool revoke) throws TDLibError
Deletes all messages between the specified dates in a chat. Supported
only for private chats and basic groups. Messages sent in the last 30 seconds will not be deleted
- public async Ok delete_chat_messages_by_sender (int64 chat_id, MessageSender sender_id) throws TDLibError
Deletes all messages sent by the specified message sender in a chat.
Supported only for supergroups; requires can_delete_messages administrator right
- public async Ok delete_chat_reply_markup (int64 chat_id, int64 message_id) throws TDLibError
Deletes the default reply markup from a chat. Must be called after a
one-time keyboard or a replyMarkupForceReply reply markup has been used. An updateChatReplyMarkup update will be sent if the reply
markup is changed
- public async Ok delete_commands (BotCommandScope scope, string language_code) throws TDLibError
Deletes commands supported by the bot for the given user scope and
language; for bots only
- public async Ok delete_default_background (bool for_dark_theme) throws TDLibError
Deletes default background for chats
- public async Ok delete_file (int32 file_id) throws TDLibError
Deletes a file from the TDLib file cache
- public async Ok delete_forum_topic (int64 chat_id, int64 message_thread_id) throws TDLibError
Deletes all messages in a forum topic; requires can_delete_messages
administrator right in the supergroup unless the user is creator of the topic, the topic has no messages from other users and has at
most 11 messages
- public async Ok delete_language_pack (string language_pack_id) throws TDLibError
Deletes all information about a language pack in the current
localization target. The language pack which is currently in use (including base language pack) or is being synchronized can't be
deleted. Can be called before authorization
- public async Ok delete_messages (int64 chat_id, ArrayList<int64?> message_ids, bool revoke) throws TDLibError
Deletes messages
- public async Ok delete_passport_element (PassportElementType type_) throws TDLibError
Deletes a Telegram Passport element
- public async Ok delete_profile_photo (int64 profile_photo_id) throws TDLibError
Deletes a profile photo
- public async Ok delete_quick_reply_shortcut (int32 shortcut_id) throws TDLibError
Deletes a quick reply shortcut
- public async Ok delete_quick_reply_shortcut_messages (int32 shortcut_id, ArrayList<int64?> message_ids) throws TDLibError
Deletes specified quick reply messages
- public async Ok delete_revoked_chat_invite_link (int64 chat_id, string invite_link) throws TDLibError
Deletes revoked chat invite links. Requires administrator privileges
and can_invite_users right in the chat for own links and owner privileges for other links
- public async Ok delete_saved_credentials () throws TDLibError
Deletes saved credentials for all payment provider bots
- public async Ok delete_saved_messages_topic_history (int64 saved_messages_topic_id) throws TDLibError
Deletes all messages in a Saved Messages topic
- public async Ok delete_saved_messages_topic_messages_by_date (int64 saved_messages_topic_id, int32 min_date, int32 max_date) throws TDLibError
Deletes all messages between the specified dates in a Saved Messages
topic. Messages sent in the last 30 seconds will not be deleted
- public async Ok delete_saved_order_info () throws TDLibError
Deletes saved order information
- public async Ok delete_sticker_set (string name) throws TDLibError
Completely deletes a sticker set
- public async Ok delete_story (int64 story_poster_chat_id, int32 story_id) throws TDLibError
Deletes a previously posted story. Can be called only if
story.can_be_deleted == true
- public async Ok destroy () throws TDLibError
Closes the TDLib instance, destroying all local data without a proper
logout. The current user session will remain in the list of all active sessions. All local data will be destroyed. After the
destruction completes updateAuthorizationState with authorizationStateClosed will be sent. Can be called before authorization
- public async Ok disable_all_supergroup_usernames (int64 supergroup_id) throws TDLibError
Disables all active non-editable usernames of a supergroup or channel,
requires owner privileges in the supergroup or channel
- public async Ok disable_proxy () throws TDLibError
Disables the currently enabled proxy. Can be called before
authorization
- public async Ok discard_call (int32 call_id, bool is_disconnected, string invite_link, int32 duration, bool is_video, int64 connection_id) throws TDLibError
Discards a call
- public async ConnectedAffiliateProgram disconnect_affiliate_program (AffiliateType affiliate, string url) throws TDLibError
Disconnects an affiliate program from the given affiliate and
immediately deactivates its referral link. Returns updated information about the disconnected affiliate program
- public async Ok disconnect_all_websites () throws TDLibError
Disconnects all websites from the current user's Telegram account
- public async Ok disconnect_website (int64 website_id) throws TDLibError
Disconnects website from the current user's Telegram account
- public async File download_file (int32 file_id, int32 priority, int64 offset, int64 limit, bool synchronous) throws TDLibError
Downloads a file from the cloud. Download progress and completion of
the download will be notified through updateFile updates
- public async BotMediaPreview edit_bot_media_preview (int64 bot_user_id, string language_code, int32 file_id, InputStoryContent content) throws TDLibError
Replaces media preview in the list of media previews of a bot. Returns
the new preview after edit is completed server-side
- public async BusinessChatLink edit_business_chat_link (string link, InputBusinessChatLink link_info) throws TDLibError
Edits a business chat link of the current account. Requires Telegram
Business subscription. Returns the edited link
- public async BusinessMessage edit_business_message_caption (string business_connection_id, int64 chat_id, int64 message_id, ReplyMarkup reply_markup, FormattedText caption, bool show_caption_above_media) throws TDLibError
Edits the caption of a message sent on behalf of a business account;
for bots only
- public async BusinessMessage edit_business_message_live_location (string business_connection_id, int64 chat_id, int64 message_id, ReplyMarkup reply_markup, Location location, int32 live_period, int32 heading, int32 proximity_alert_radius) throws TDLibError
Edits the content of a live location in a message sent on behalf of a
business account; for bots only
- public async BusinessMessage edit_business_message_media (string business_connection_id, int64 chat_id, int64 message_id, ReplyMarkup reply_markup, InputMessageContent input_message_content) throws TDLibError
Edits the media content of a message with a text, an animation, an
audio, a document, a photo or a video in a message sent on behalf of a business account; for bots only
- public async BusinessMessage edit_business_message_reply_markup (string business_connection_id, int64 chat_id, int64 message_id, ReplyMarkup reply_markup) throws TDLibError
Edits the reply markup of a message sent on behalf of a business
account; for bots only
- public async BusinessMessage edit_business_message_text (string business_connection_id, int64 chat_id, int64 message_id, ReplyMarkup reply_markup, InputMessageContent input_message_content) throws TDLibError
Edits the text of a text or game message sent on behalf of a business
account; for bots only
- public async Story edit_business_story (int64 story_poster_chat_id, int32 story_id, InputStoryContent content, InputStoryAreas areas, FormattedText caption, StoryPrivacySettings privacy_settings) throws TDLibError
Changes a story posted by the bot on behalf of a business account; for
bots only
- public async ChatFolderInfo edit_chat_folder (int32 chat_folder_id, ChatFolder folder) throws TDLibError
Edits existing chat folder. Returns information about the edited chat
folder
- public async ChatFolderInviteLink edit_chat_folder_invite_link (int32 chat_folder_id, string invite_link, string name, ArrayList<int64?> chat_ids) throws TDLibError
Edits an invite link for a chat folder
- public async ChatInviteLink edit_chat_invite_link (int64 chat_id, string invite_link, string name, int32 expiration_date, int32 member_limit, bool creates_join_request) throws TDLibError
Edits a non-primary invite link for a chat. Available for basic
groups, supergroups, and channels. If the link creates a subscription, then expiration_date, member_limit and creates_join_request
must not be used. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for
other links
- public async ChatInviteLink edit_chat_subscription_invite_link (int64 chat_id, string invite_link, string name) throws TDLibError
Edits a subscription invite link for a channel chat. Requires
can_invite_users right in the chat for own links and owner privileges for other links
- public async Ok edit_custom_language_pack_info (LanguagePackInfo info) throws TDLibError
Edits information about a custom local language pack in the current
localization target. Can be called before authorization
- public async Ok edit_forum_topic (int64 chat_id, int64 message_thread_id, string name, bool edit_icon_custom_emoji, int64 icon_custom_emoji_id) throws TDLibError
Edits title and icon of a topic in a forum supergroup chat; requires
can_manage_topics right in the supergroup unless the user is creator of the topic
- public async Ok edit_inline_message_caption (string inline_message_id, ReplyMarkup reply_markup, FormattedText caption, bool show_caption_above_media) throws TDLibError
Edits the caption of an inline message sent via a bot; for bots only
- public async Ok edit_inline_message_live_location (string inline_message_id, ReplyMarkup reply_markup, Location location, int32 live_period, int32 heading, int32 proximity_alert_radius) throws TDLibError
Edits the content of a live location in an inline message sent via a
bot; for bots only
- public async Ok edit_inline_message_media (string inline_message_id, ReplyMarkup reply_markup, InputMessageContent input_message_content) throws TDLibError
Edits the media content of a message with a text, an animation, an
audio, a document, a photo or a video in an inline message sent via a bot; for bots only
- public async Ok edit_inline_message_reply_markup (string inline_message_id, ReplyMarkup reply_markup) throws TDLibError
Edits the reply markup of an inline message sent via a bot; for bots
only
- public async Ok edit_inline_message_text (string inline_message_id, ReplyMarkup reply_markup, InputMessageContent input_message_content) throws TDLibError
Edits the text of an inline text or game message sent via a bot; for
bots only
- public async Message edit_message_caption (int64 chat_id, int64 message_id, ReplyMarkup reply_markup, FormattedText caption, bool show_caption_above_media) throws TDLibError
Edits the message content caption. Returns the edited message after
the edit is completed on the server side
- public async Message edit_message_live_location (int64 chat_id, int64 message_id, ReplyMarkup reply_markup, Location location, int32 live_period, int32 heading, int32 proximity_alert_radius) throws TDLibError
Edits the message content of a live location. Messages can be edited
for a limited period of time specified in the live location. Returns the edited message after the edit is completed on the server side
- public async Message edit_message_media (int64 chat_id, int64 message_id, ReplyMarkup reply_markup, InputMessageContent input_message_content) throws TDLibError
Edits the media content of a message, including message caption. If
only the caption needs to be edited, use Client.edit_message_caption
instead. The type of message content in an album can't be changed with exception of replacing a photo with a video or vice versa.
Returns the edited message after the edit is completed on the server side
- public async Message edit_message_reply_markup (int64 chat_id, int64 message_id, ReplyMarkup reply_markup) throws TDLibError
Edits the message reply markup; for bots only. Returns the edited
message after the edit is completed on the server side
- public async Ok edit_message_scheduling_state (int64 chat_id, int64 message_id, MessageSchedulingState scheduling_state) throws TDLibError
Edits the time when a scheduled message will be sent. Scheduling state
of all messages in the same album or forwarded together with the message will be also changed
- public async Message edit_message_text (int64 chat_id, int64 message_id, ReplyMarkup reply_markup, InputMessageContent input_message_content) throws TDLibError
Edits the text of a message (or a text of a game message). Returns the
edited message after the edit is completed on the server side
- public async Proxy edit_proxy (int32 proxy_id, string server, int32 port, bool enable, ProxyType type_) throws TDLibError
Edits an existing proxy server for network requests. Can be called
before authorization
- public async Ok edit_quick_reply_message (int32 shortcut_id, int64 message_id, InputMessageContent input_message_content) throws TDLibError
Asynchronously edits the text, media or caption of a quick reply
message. Use quickReplyMessage.can_be_edited to check whether a message can be edited. Media message can be edited only to a media
message. The type of message content in an album can't be changed with exception of replacing a photo with a video or vice versa
- public async Ok edit_star_subscription (string subscription_id, bool is_canceled) throws TDLibError
Cancels or re-enables Telegram Star subscription
- public async Ok edit_story (int64 story_poster_chat_id, int32 story_id, InputStoryContent content, InputStoryAreas areas, FormattedText caption) throws TDLibError
Changes content and caption of a story. Can be called only if
story.can_be_edited == true
- public async Ok edit_story_cover (int64 story_poster_chat_id, int32 story_id, double cover_frame_timestamp) throws TDLibError
Changes cover of a video story. Can be called only if
story.can_be_edited == true and the story isn't being edited now
- public async Ok edit_user_star_subscription (int64 user_id, string telegram_payment_charge_id, bool is_canceled) throws TDLibError
Cancels or re-enables Telegram Star subscription for a user; for bots
only
- public async Ok enable_proxy (int32 proxy_id) throws TDLibError
Enables a proxy. Only one proxy can be enabled at a time. Can be
called before authorization
- public async Data encrypt_group_call_data (int32 group_call_id, GroupCallDataChannel data_channel, Bytes data, int32 unencrypted_prefix_size) throws TDLibError
Encrypts group call data before sending them over network using
tgcalls
- public async Ok end_group_call (int32 group_call_id) throws TDLibError
Ends a group call. Requires groupCall.can_be_managed right for video
chats or groupCall.is_owned otherwise
- public async Ok end_group_call_recording (int32 group_call_id) throws TDLibError
Ends recording of an active group call; for video chats only. Requires
groupCall.can_be_managed right
- public async Ok end_group_call_screen_sharing (int32 group_call_id) throws TDLibError
Ends screen sharing in a joined group call
- public async Ok finish_file_generation (int64 generation_id, Error error) throws TDLibError
Finishes the file generation
- public async Messages forward_messages (int64 chat_id, int64 message_thread_id, int64 from_chat_id, ArrayList<int64?> message_ids, MessageSendOptions options, bool send_copy, bool remove_caption) throws TDLibError
Forwards previously sent messages. Returns the forwarded messages in
the same order as the message identifiers passed in message_ids. If a message can't be forwarded, null will be returned instead of the
message
- public async AccountTtl get_account_ttl () throws TDLibError
Returns the period of inactivity after which the account of the
current user will automatically be deleted
- public async Sessions get_active_sessions () throws TDLibError
Returns all active sessions of the current user
- public async PassportElements get_all_passport_elements (string password) throws TDLibError
Returns all available Telegram Passport elements
- public async Emojis get_all_sticker_emojis (StickerType sticker_type, string query, int64 chat_id, bool return_only_main_emoji) throws TDLibError
Returns unique emoji that correspond to stickers to be found by the
getStickers(sticker_type, query, 1000000, chat_id)
- public async AnimatedEmoji get_animated_emoji (string emoji) throws TDLibError
Returns an animated emoji corresponding to a given emoji. Returns a
404 error if the emoji has no animated emoji
- public async JsonValue get_application_config () throws TDLibError
Returns application config, provided by the server. Can be called
before authorization
- public async HttpUrl get_application_download_link () throws TDLibError
Returns the link for downloading official Telegram application to be
used when the current user invites friends to Telegram
- public async ArchiveChatListSettings get_archive_chat_list_settings () throws TDLibError
Returns settings for automatic moving of chats to and from the Archive
chat lists
- public async StickerSets get_archived_sticker_sets (StickerType sticker_type, int64 offset_sticker_set_id, int32 limit) throws TDLibError
Returns a list of archived sticker sets
- public async StickerSets get_attached_sticker_sets (int32 file_id) throws TDLibError
Returns a list of sticker sets attached to a file, including regular,
mask, and emoji sticker sets. Currently, only animations, photos, and videos can have attached sticker sets
- public async AttachmentMenuBot get_attachment_menu_bot (int64 bot_user_id) throws TDLibError
Returns information about a bot that can be added to attachment or
side menu
- public async AuthorizationState get_authorization_state () throws TDLibError
Returns the current authorization state. This is an offline method.
For informational purposes only. Use updateAuthorizationState instead to maintain the current authorization state. Can be called
before initialization
- public async AutoDownloadSettingsPresets get_auto_download_settings_presets () throws TDLibError
Returns auto-download settings presets for the current user
- public async AutosaveSettings get_autosave_settings () throws TDLibError
Returns autosave settings for the current user
- public async ChatBoostSlots get_available_chat_boost_slots () throws TDLibError
Returns the list of available chat boost slots for the current user
- public async AvailableGifts get_available_gifts () throws TDLibError
Returns gifts that can be sent to other users and channel chats
- public async HttpUrl get_background_url (string name, BackgroundType type_) throws TDLibError
Constructs a persistent HTTP URL for a background
- public async BankCardInfo get_bank_card_info (string bank_card_number) throws TDLibError
Returns information about a bank card
- public async BasicGroup get_basic_group (int64 basic_group_id) throws TDLibError
Returns information about a basic group by its identifier. This is an
offline method if the current user is not a bot
- public async BasicGroupFullInfo get_basic_group_full_info (int64 basic_group_id) throws TDLibError
Returns full information about a basic group by its identifier
- public async MessageSenders get_blocked_message_senders (BlockList block_list, int32 offset, int32 limit) throws TDLibError
Returns users and chats that were blocked by the current user
- public async Text get_bot_info_description (int64 bot_user_id, string language_code) throws TDLibError
Returns the text shown in the chat with a bot if the chat is empty in
the given language. Can be called only if userTypeBot.can_be_edited == true
- public async Text get_bot_info_short_description (int64 bot_user_id, string language_code) throws TDLibError
Returns the text shown on a bot's profile page and sent together with
the link when users share the bot in the given language. Can be called only if userTypeBot.can_be_edited == true
- public async BotMediaPreviewInfo get_bot_media_preview_info (int64 bot_user_id, string language_code) throws TDLibError
Returns the list of media previews for the given language and the list
of languages for which the bot has dedicated previews
- public async BotMediaPreviews get_bot_media_previews (int64 bot_user_id) throws TDLibError
Returns the list of media previews of a bot
- public async Text get_bot_name (int64 bot_user_id, string language_code) throws TDLibError
Returns the name of a bot in the given language. Can be called only if
userTypeBot.can_be_edited == true
- public async Count get_bot_similar_bot_count (int64 bot_user_id, bool return_local) throws TDLibError
Returns approximate number of bots similar to the given bot
- public async Users get_bot_similar_bots (int64 bot_user_id) throws TDLibError
Returns a list of bots similar to the given bot
- public async StarAmount get_business_account_star_amount (string business_connection_id) throws TDLibError
Returns the amount of Telegram Stars owned by a business account; for
bots only
- public async BusinessChatLinkInfo get_business_chat_link_info (string link_name) throws TDLibError
Returns information about a business chat link
- public async BusinessChatLinks get_business_chat_links () throws TDLibError
Returns business chat links created for the current account
- public async BusinessConnectedBot get_business_connected_bot () throws TDLibError
Returns the business bot that is connected to the current user
account. Returns a 404 error if there is no connected bot
- public async BusinessConnection get_business_connection (string connection_id) throws TDLibError
Returns information about a business connection by its identifier; for
bots only
- public async BusinessFeatures get_business_features (BusinessFeature source) throws TDLibError
Returns information about features, available to Business users
- public async CallbackQueryAnswer get_callback_query_answer (int64 chat_id, int64 message_id, CallbackQueryPayload payload) throws TDLibError
Sends a callback query to a bot and returns an answer. Returns an
error with code 502 if the bot fails to answer the query before the query timeout expires
- public async Message get_callback_query_message (int64 chat_id, int64 message_id, int64 callback_query_id) throws TDLibError
Returns information about a message with the callback button that
originated a callback query; for bots only
- public async Chat get_chat (int64 chat_id) throws TDLibError
Returns information about a chat by its identifier. This is an offline
method if the current user is not a bot
- public async ChatActiveStories get_chat_active_stories (int64 chat_id) throws TDLibError
Returns the list of active stories posted by the given chat
- public async ChatAdministrators get_chat_administrators (int64 chat_id) throws TDLibError
Returns a list of administrators of the chat with their custom titles
- public async Stories get_chat_archived_stories (int64 chat_id, int32 from_story_id, int32 limit) throws TDLibError
Returns the list of all stories posted by the given chat; requires
can_edit_stories right in the chat. The stories are returned in reverse chronological order (i.e., in order of decreasing story_id).
For optimal performance, the number of returned stories is chosen by TDLib
- public async ChatMessageSenders get_chat_available_message_senders (int64 chat_id) throws TDLibError
Returns the list of message sender identifiers, which can be used to
send messages in a chat
- public async MessageSenders get_chat_available_paid_message_reaction_senders (int64 chat_id) throws TDLibError
Returns the list of message sender identifiers, which can be used to
send a paid reaction in a chat
- public async ChatBoostFeatures get_chat_boost_features (bool is_channel) throws TDLibError
Returns the list of features available for different chat boost
levels. This is an offline method
- public async ChatBoostLevelFeatures get_chat_boost_level_features (bool is_channel, int32 level) throws TDLibError
Returns the list of features available on the specific chat boost
level. This is an offline method
- public async ChatBoostLink get_chat_boost_link (int64 chat_id) throws TDLibError
Returns an HTTPS link to boost the specified supergroup or channel
chat
- public async ChatBoostLinkInfo get_chat_boost_link_info (string url) throws TDLibError
Returns information about a link to boost a chat. Can be called for
any internal link of the type internalLinkTypeChatBoost
- public async ChatBoostStatus get_chat_boost_status (int64 chat_id) throws TDLibError
Returns the current boost status for a supergroup or a channel chat
- public async FoundChatBoosts get_chat_boosts (int64 chat_id, bool only_gift_codes, string offset, int32 limit) throws TDLibError
Returns the list of boosts applied to a chat; requires administrator
rights in the chat
- public async ChatEvents get_chat_event_log (int64 chat_id, string query, int64 from_event_id, int32 limit, ChatEventLogFilters filters, ArrayList<int64?> user_ids) throws TDLibError
Returns a list of service actions taken by chat members and
administrators in the last 48 hours. Available only for supergroups and channels. Requires administrator rights. Returns results in
reverse chronological order (i.e., in order of decreasing event_id)
- public async ChatFolder get_chat_folder (int32 chat_folder_id) throws TDLibError
Returns information about a chat folder by its identifier
- public async Count get_chat_folder_chat_count (ChatFolder folder) throws TDLibError
Returns approximate number of chats in a being created chat folder.
Main and archive chat lists must be fully preloaded for this function to work correctly
- public async Chats get_chat_folder_chats_to_leave (int32 chat_folder_id) throws TDLibError
Returns identifiers of pinned or always included chats from a chat
folder, which are suggested to be left when the chat folder is deleted
- public async ChatFolderIcon get_chat_folder_default_icon_name (ChatFolder folder) throws TDLibError
Returns default icon name for a folder. Can be called synchronously
- public ChatFolderIcon get_chat_folder_default_icon_name_sync (ChatFolder folder) throws TDLibError
Returns default icon name for a folder. Can be called synchronously
- public async ChatFolderInviteLinks get_chat_folder_invite_links (int32 chat_folder_id) throws TDLibError
Returns invite links created by the current user for a shareable chat
folder
- public async Chats get_chat_folder_new_chats (int32 chat_folder_id) throws TDLibError
Returns new chats added to a shareable chat folder by its owner. The
method must be called at most once in getOption("chat_folder_new_chats_update_period") for the given chat folder
- public async Messages get_chat_history (int64 chat_id, int64 from_message_id, int32 offset, int32 limit, bool only_local) throws TDLibError
Returns messages in a chat. The messages are returned in reverse
chronological order (i.e., in order of decreasing message_id). For optimal performance, the number of returned messages is chosen by
TDLib. This is an offline method if only_local is true
- public async ChatInviteLink get_chat_invite_link (int64 chat_id, string invite_link) throws TDLibError
Returns information about an invite link. Requires administrator
privileges and can_invite_users right in the chat to get own links and owner privileges to get other links
- public async ChatInviteLinkCounts get_chat_invite_link_counts (int64 chat_id) throws TDLibError
Returns the list of chat administrators with number of their invite
links. Requires owner privileges in the chat
- public async ChatInviteLinkMembers get_chat_invite_link_members (int64 chat_id, string invite_link, bool only_with_expired_subscription, ChatInviteLinkMember offset_member, int32 limit) throws TDLibError
Returns chat members joined a chat via an invite link. Requires
administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links
- public async ChatInviteLinks get_chat_invite_links (int64 chat_id, int64 creator_user_id, bool is_revoked, int32 offset_date, string offset_invite_link, int32 limit) throws TDLibError
Returns invite links for a chat created by specified administrator.
Requires administrator privileges and can_invite_users right in the chat to get own links and owner privileges to get other links
- public async ChatJoinRequests get_chat_join_requests (int64 chat_id, string invite_link, string query, ChatJoinRequest offset_request, int32 limit) throws TDLibError
Returns pending join requests in a chat
- public async ChatLists get_chat_lists_to_add_chat (int64 chat_id) throws TDLibError
Returns chat lists to which the chat can be added. This is an offline
method
- public async ChatMember get_chat_member (int64 chat_id, MessageSender member_id) throws TDLibError
Returns information about a single member of a chat
- public async Message get_chat_message_by_date (int64 chat_id, int32 date) throws TDLibError
Returns the last message sent in a chat no later than the specified
date. Returns a 404 error if such message doesn't exist
- public async MessageCalendar get_chat_message_calendar (int64 chat_id, SearchMessagesFilter filter, int64 from_message_id, int64 saved_messages_topic_id) throws TDLibError
Returns information about the next messages of the specified type in
the chat split by days. Returns the results in reverse chronological order. Can return partial result for the last returned day.
Behavior of this method depends on the value of the option "utc_time_offset"
- public async Count get_chat_message_count (int64 chat_id, SearchMessagesFilter filter, int64 saved_messages_topic_id, bool return_local) throws TDLibError
Returns approximate number of messages of the specified type in the
chat
- public async Count get_chat_message_position (int64 chat_id, int64 message_id, SearchMessagesFilter filter, int64 message_thread_id, int64 saved_messages_topic_id) throws TDLibError
Returns approximate 1-based position of a message among messages,
which can be found by the specified filter in the chat. Cannot be used in secret chats
- public async Chats get_chat_notification_settings_exceptions (NotificationSettingsScope scope, bool compare_sound) throws TDLibError
Returns the list of chats with non-default notification settings for
new messages
- public async Message get_chat_pinned_message (int64 chat_id) throws TDLibError
Returns information about a newest pinned message in the chat. Returns
a 404 error if the message doesn't exist
- public async Stories get_chat_posted_to_chat_page_stories (int64 chat_id, int32 from_story_id, int32 limit) throws TDLibError
Returns the list of stories that posted by the given chat to its chat
page. If from_story_id == 0, then pinned stories are returned first. Then, stories are returned in reverse chronological order (i.e.,
in order of decreasing story_id). For optimal performance, the number of returned stories is chosen by TDLib
- public async ChatRevenueStatistics get_chat_revenue_statistics (int64 chat_id, bool is_dark) throws TDLibError
Returns detailed revenue statistics about a chat. Currently, this
method can be used only for channels if supergroupFullInfo.can_get_revenue_statistics == true or bots if
userFullInfo.bot_info.can_get_revenue_statistics == true
- public async ChatRevenueTransactions get_chat_revenue_transactions (int64 chat_id, int32 offset, int32 limit) throws TDLibError
Returns the list of revenue transactions for a chat. Currently, this
method can be used only for channels if supergroupFullInfo.can_get_revenue_statistics == true or bots if
userFullInfo.bot_info.can_get_revenue_statistics == true
- public async HttpUrl get_chat_revenue_withdrawal_url (int64 chat_id, string password) throws TDLibError
Returns a URL for chat revenue withdrawal; requires owner privileges
in the channel chat or the bot. Currently, this method can be used only if getOption("can_withdraw_chat_revenue") for channels with
supergroupFullInfo.can_get_revenue_statistics == true or bots with userFullInfo.bot_info.can_get_revenue_statistics == true
- public async Messages get_chat_scheduled_messages (int64 chat_id) throws TDLibError
Returns all scheduled messages in a chat. The messages are returned in
reverse chronological order (i.e., in order of decreasing message_id)
- public async Count get_chat_similar_chat_count (int64 chat_id, bool return_local) throws TDLibError
Returns approximate number of chats similar to the given chat
- public async Chats get_chat_similar_chats (int64 chat_id) throws TDLibError
Returns a list of chats similar to the given chat
- public async MessagePositions get_chat_sparse_message_positions (int64 chat_id, SearchMessagesFilter filter, int64 from_message_id, int32 limit, int64 saved_messages_topic_id) throws TDLibError
Returns sparse positions of messages of the specified type in the chat
to be used for shared media scroll implementation. Returns the results in reverse chronological order (i.e., in order of decreasing
message_id). Cannot be used in secret chats or with searchMessagesFilterFailedToSend filter without an enabled message database
- public async SponsoredMessages get_chat_sponsored_messages (int64 chat_id) throws TDLibError
Returns sponsored messages to be shown in a chat; for channel chats
and chats with bots only
- public async ChatStatistics get_chat_statistics (int64 chat_id, bool is_dark) throws TDLibError
Returns detailed statistics about a chat. Currently, this method can
be used only for supergroups and channels. Can be used only if supergroupFullInfo.can_get_statistics == true
- public async StoryInteractions get_chat_story_interactions (int64 story_poster_chat_id, int32 story_id, ReactionType reaction_type, bool prefer_forwards, string offset, int32 limit) throws TDLibError
Returns interactions with a story posted in a chat. Can be used only
if story is posted on behalf of a chat and the user is an administrator in the chat
- public async Chats get_chats (ChatList chat_list, int32 limit) throws TDLibError
Returns an ordered list of chats from the beginning of a chat list.
For informational purposes only. Use Client.load_chats and updates
processing instead to maintain chat lists in a consistent state
- public async Chats get_chats_for_chat_folder_invite_link (int32 chat_folder_id) throws TDLibError
Returns identifiers of chats from a chat folder, suitable for adding
to a chat folder invite link
- public async Chats get_chats_to_post_stories () throws TDLibError
Returns supergroup and channel chats in which the current user has the
right to post stories. The chats must be rechecked with
Client.can_post_story before actually trying to post a story there
- public async Users get_close_friends () throws TDLibError
- public async CollectibleItemInfo get_collectible_item_info (CollectibleItemType type_) throws TDLibError
- public async BotCommands get_commands (BotCommandScope scope, string language_code) throws TDLibError
Returns the list of commands supported by the bot for the given user
scope and language; for bots only
- public async ConnectedAffiliateProgram get_connected_affiliate_program (AffiliateType affiliate, int64 bot_user_id) throws TDLibError
Returns an affiliate program that were connected to the given
affiliate by identifier of the bot that created the program
- public async ConnectedAffiliatePrograms get_connected_affiliate_programs (AffiliateType affiliate, string offset, int32 limit) throws TDLibError
Returns affiliate programs that were connected to the given affiliate
- public async ConnectedWebsites get_connected_websites () throws TDLibError
Returns all website where the current user used Telegram to log in
- public async Users get_contacts () throws TDLibError
Returns all contacts of the user
- public async Countries get_countries () throws TDLibError
Returns information about existing countries. Can be called before
authorization
- public async Text get_country_code () throws TDLibError
Uses the current IP address to find the current country. Returns two-
letter ISO 3166-1 alpha-2 country code. Can be called before authorization
- public async Text get_country_flag_emoji (string country_code) throws TDLibError
Returns an emoji for the given country. Returns an empty string on
failure. Can be called synchronously
- public Text get_country_flag_emoji_sync (string country_code) throws TDLibError
Returns an emoji for the given country. Returns an empty string on
failure. Can be called synchronously
- public async Chats get_created_public_chats (PublicChatType type_) throws TDLibError
Returns a list of public chats of the specified type, owned by the
user
- public async Updates get_current_state () throws TDLibError
Returns all updates needed to restore current TDLib state, i.e. all
actual updateAuthorizationState/updateUser/updateNewChat and others. This is especially useful if TDLib is run in a separate process.
Can be called before initialization
- public async CurrentWeather get_current_weather (Location location) throws TDLibError
Returns the current weather in the given location
- public async Stickers get_custom_emoji_reaction_animations () throws TDLibError
Returns TGS stickers with generic animations for custom emoji
reactions
- public async Stickers get_custom_emoji_stickers (ArrayList<int64?> custom_emoji_ids) throws TDLibError
Returns the list of custom emoji stickers by their identifiers.
Stickers are returned in arbitrary order. Only found stickers are returned
- public async DatabaseStatistics get_database_statistics () throws TDLibError
Returns database statistics
- public async DeepLinkInfo get_deep_link_info (string link) throws TDLibError
Returns information about a tg://
deep link. Use "tg://need_update_for_some_feature" or
"tg:some_unsupported_feature" for testing. Returns a 404 error for unknown links. Can be called before authorization
- public async Stickers get_default_background_custom_emoji_stickers () throws TDLibError
Returns default list of custom emoji stickers for reply background
- public async EmojiStatusCustomEmojis get_default_chat_emoji_statuses () throws TDLibError
Returns default emoji statuses for chats
- public async Stickers get_default_chat_photo_custom_emoji_stickers () throws TDLibError
Returns default list of custom emoji stickers for placing on a chat
photo
- public async EmojiStatusCustomEmojis get_default_emoji_statuses () throws TDLibError
Returns default emoji statuses for self status
- public async MessageAutoDeleteTime get_default_message_auto_delete_time () throws TDLibError
Returns default message auto-delete time setting for new chats
- public async Stickers get_default_profile_photo_custom_emoji_stickers () throws TDLibError
Returns default list of custom emoji stickers for placing on a profile
photo
- public async EmojiStatusCustomEmojis get_disallowed_chat_emoji_statuses () throws TDLibError
Returns the list of emoji statuses, which can't be used as chat emoji
status, even they are from a sticker set with is_allowed_as_chat_emoji_status == true
- public async EmojiCategories get_emoji_categories (EmojiCategoryType type_) throws TDLibError
Returns available emoji categories
- public async EmojiReaction get_emoji_reaction (string emoji) throws TDLibError
Returns information about an emoji reaction. Returns a 404 error if
the reaction is not found
- public async HttpUrl get_emoji_suggestions_url (string language_code) throws TDLibError
Returns an HTTP URL which can be used to automatically log in to the
translation platform and suggest new emoji replacements. The URL will be valid for 30 seconds after generation
- public async HttpUrl get_external_link (string link, bool allow_write_access) throws TDLibError
Returns an HTTP URL which can be used to automatically authorize the
current user on a website after clicking an HTTP link. Use the method
Client.get_external_link_info to find whether a prior user
confirmation is needed
- public async LoginUrlInfo get_external_link_info (string link) throws TDLibError
Returns information about an action to be done when the current user
clicks an external link. Don't use this method for links from secret chats if link preview is disabled in secret chats
- public async Stickers get_favorite_stickers () throws TDLibError
Returns favorite stickers
- public async File get_file (int32 file_id) throws TDLibError
Returns information about a file. This is an offline method
- public async FileDownloadedPrefixSize get_file_downloaded_prefix_size (int32 file_id, int64 offset) throws TDLibError
Returns file downloaded prefix size from a given offset, in bytes
- public async Text get_file_extension (string mime_type) throws TDLibError
Returns the extension of a file, guessed by its MIME type. Returns an
empty string on failure. Can be called synchronously
- public Text get_file_extension_sync (string mime_type) throws TDLibError
Returns the extension of a file, guessed by its MIME type. Returns an
empty string on failure. Can be called synchronously
- public async Text get_file_mime_type (string file_name) throws TDLibError
Returns the MIME type of a file, guessed by its extension. Returns an
empty string on failure. Can be called synchronously
- public Text get_file_mime_type_sync (string file_name) throws TDLibError
Returns the MIME type of a file, guessed by its extension. Returns an
empty string on failure. Can be called synchronously
- public async ForumTopic get_forum_topic (int64 chat_id, int64 message_thread_id) throws TDLibError
Returns information about a forum topic
- public async Stickers get_forum_topic_default_icons () throws TDLibError
Returns the list of custom emoji, which can be used as forum topic
icon by all users
- public async MessageLink get_forum_topic_link (int64 chat_id, int64 message_thread_id) throws TDLibError
Returns an HTTPS link to a topic in a forum chat. This is an offline
method
- public async ForumTopics get_forum_topics (int64 chat_id, string query, int32 offset_date, int64 offset_message_id, int64 offset_message_thread_id, int32 limit) throws TDLibError
Returns found forum topics in a forum chat. This is a temporary method
for getting information about topic list from the server
- public async GameHighScores get_game_high_scores (int64 chat_id, int64 message_id, int64 user_id) throws TDLibError
Returns the high scores for a game and some part of the high score
table in the range of the specified user; for bots only
- public async GiftUpgradePreview get_gift_upgrade_preview (int64 gift_id) throws TDLibError
Returns examples of possible upgraded gifts for a regular gift
- public async GiveawayInfo get_giveaway_info (int64 chat_id, int64 message_id) throws TDLibError
Returns information about a giveaway
- public async Stickers get_greeting_stickers () throws TDLibError
Returns greeting stickers from regular sticker sets that can be used
for the start page of other users
- public async FoundUsers get_grossing_web_app_bots (string offset, int32 limit) throws TDLibError
Returns the most grossing Web App bots
- public async GroupCall get_group_call (int32 group_call_id) throws TDLibError
Returns information about a group call
- public async GroupCallParticipants get_group_call_participants (InputGroupCall input_group_call, int32 limit) throws TDLibError
Returns information about participants of a non-joined group call that
is not bound to a chat
- public async Chats get_groups_in_common (int64 user_id, int64 offset_chat_id, int32 limit) throws TDLibError
Returns a list of common group chats with a given user. Chats are
sorted by their type and creation date
- public async Count get_imported_contact_count () throws TDLibError
Returns the total number of imported contacts
- public async Chats get_inactive_supergroup_chats () throws TDLibError
Returns a list of recently inactive supergroups and channels. Can be
used when user reaches limit on the number of joined supergroups and channels and receives CHANNELS_TOO_MUCH error. Also, the limit
can be increased with Telegram Premium
- public async GameHighScores get_inline_game_high_scores (string inline_message_id, int64 user_id) throws TDLibError
Returns game high scores and some part of the high score table in the
range of the specified user; for bots only
- public async InlineQueryResults get_inline_query_results (int64 bot_user_id, int64 chat_id, Location user_location, string query, string offset) throws TDLibError
Sends an inline query to a bot and returns its results. Returns an
error with code 502 if the bot fails to answer the query before the query timeout expires
- public async Backgrounds get_installed_backgrounds (bool for_dark_theme) throws TDLibError
Returns backgrounds installed by the user
- public async StickerSets get_installed_sticker_sets (StickerType sticker_type) throws TDLibError
Returns a list of installed sticker sets
- public async HttpUrl get_internal_link (InternalLinkType type_, bool is_http) throws TDLibError
Returns an HTTPS or a tg: link with the given type. Can be called
before authorization
- public async InternalLinkType get_internal_link_type (string link) throws TDLibError
Returns information about the type of internal link. Returns a 404
error if the link is not internal. Can be called before authorization
- public async Text get_json_string (JsonValue json_value) throws TDLibError
Converts a JsonValue object to corresponding JSON-serialized string.
Can be called synchronously
- public Text get_json_string_sync (JsonValue json_value) throws TDLibError
Converts a JsonValue object to corresponding JSON-serialized string.
Can be called synchronously
- public async JsonValue get_json_value (string json) throws TDLibError
Converts a JSON-serialized string to corresponding JsonValue object.
Can be called synchronously
- public JsonValue get_json_value_sync (string json) throws TDLibError
Converts a JSON-serialized string to corresponding JsonValue object.
Can be called synchronously
- public async Emojis get_keyword_emojis (string text, ArrayList<string?> input_language_codes) throws TDLibError
Return emojis matching the keyword. Supported only if the file
database is enabled. Order of results is unspecified
- public async LanguagePackInfo get_language_pack_info (string language_pack_id) throws TDLibError
Returns information about a language pack. Returned language pack
identifier may be different from a provided one. Can be called before authorization
- public async LanguagePackStringValue get_language_pack_string (string language_pack_database_path, string localization_target, string language_pack_id, string key) throws TDLibError
Returns a string stored in the local database from the specified
localization target and language pack by its key. Returns a 404 error if the string is not found. Can be called synchronously
- public LanguagePackStringValue get_language_pack_string_sync (string language_pack_database_path, string localization_target, string language_pack_id, string key) throws TDLibError
Returns a string stored in the local database from the specified
localization target and language pack by its key. Returns a 404 error if the string is not found. Can be called synchronously
- public async LanguagePackStrings get_language_pack_strings (string language_pack_id, ArrayList<string?> keys) throws TDLibError
Returns strings from a language pack in the current localization
target by their keys. Can be called before authorization
- public async LinkPreview get_link_preview (FormattedText text, LinkPreviewOptions link_preview_options) throws TDLibError
Returns a link preview by the text of a message. Do not call this
function too often. Returns a 404 error if the text has no link preview
- public async LocalizationTargetInfo get_localization_target_info (bool only_local) throws TDLibError
Returns information about the current localization target. This is an
offline method if only_local is true. Can be called before authorization
- public async LogStream get_log_stream () throws TDLibError
Returns information about currently used log stream for internal
logging of TDLib. Can be called synchronously
- public LogStream get_log_stream_sync () throws TDLibError
Returns information about currently used log stream for internal
logging of TDLib. Can be called synchronously
- public async LogVerbosityLevel get_log_tag_verbosity_level (string tag) throws TDLibError
Returns current verbosity level for a specified TDLib internal log
tag. Can be called synchronously
- public LogVerbosityLevel get_log_tag_verbosity_level_sync (string tag) throws TDLibError
Returns current verbosity level for a specified TDLib internal log
tag. Can be called synchronously
- public async LogTags get_log_tags () throws TDLibError
Returns the list of available TDLib internal log tags, for example,
["actor", "binlog", "connections", "notifications", "proxy"]. Can be called synchronously
- public LogTags get_log_tags_sync () throws TDLibError
Returns the list of available TDLib internal log tags, for example,
["actor", "binlog", "connections", "notifications", "proxy"]. Can be called synchronously
- public async LogVerbosityLevel get_log_verbosity_level () throws TDLibError
Returns current verbosity level of the internal logging of TDLib. Can
be called synchronously
- public LogVerbosityLevel get_log_verbosity_level_sync () throws TDLibError
Returns current verbosity level of the internal logging of TDLib. Can
be called synchronously
- public async HttpUrl get_login_url (int64 chat_id, int64 message_id, int64 button_id, bool allow_write_access) throws TDLibError
Returns an HTTP URL which can be used to automatically authorize the
user on a website after clicking an inline button of type inlineKeyboardButtonTypeLoginUrl. Use the method
Client.get_login_url_info to find whether a prior user confirmation
is needed. If an error is returned, then the button must be handled as an ordinary URL button
- public async LoginUrlInfo get_login_url_info (int64 chat_id, int64 message_id, int64 button_id) throws TDLibError
Returns information about a button of type
inlineKeyboardButtonTypeLoginUrl. The method needs to be called when the user presses the button
- public async MainWebApp get_main_web_app (int64 chat_id, int64 bot_user_id, string start_parameter, WebAppOpenParameters parameters) throws TDLibError
Returns information needed to open the main Web App of a bot
- public async File get_map_thumbnail_file (Location location, int32 zoom, int32 width, int32 height, int32 scale, int64 chat_id) throws TDLibError
Returns information about a file with a map thumbnail in PNG format.
Only map thumbnail files with size less than 1MB can be downloaded
- public async FormattedText get_markdown_text (FormattedText text) throws TDLibError
Replaces text entities with Markdown formatting in a human-friendly
format. Entities that can't be represented in Markdown unambiguously are kept as is. Can be called synchronously
- public FormattedText get_markdown_text_sync (FormattedText text) throws TDLibError
Replaces text entities with Markdown formatting in a human-friendly
format. Entities that can't be represented in Markdown unambiguously are kept as is. Can be called synchronously
- public async User get_me () throws TDLibError
Returns the current user
- public async BotMenuButton get_menu_button (int64 user_id) throws TDLibError
Returns menu button set by the bot for the given user; for bots only
- public async Message get_message (int64 chat_id, int64 message_id) throws TDLibError
Returns information about a message. Returns a 404 error if the
message doesn't exist
- public async AddedReactions get_message_added_reactions (int64 chat_id, int64 message_id, ReactionType reaction_type, string offset, int32 limit) throws TDLibError
Returns reactions added for a message, along with their sender
- public async AvailableReactions get_message_available_reactions (int64 chat_id, int64 message_id, int32 row_size) throws TDLibError
Returns reactions, which can be added to a message. The list can
change after updateActiveEmojiReactions, updateChatAvailableReactions for the chat, or updateMessageInteractionInfo for the message
- public async MessageEffect get_message_effect (int64 effect_id) throws TDLibError
Returns information about a message effect. Returns a 404 error if the
effect is not found
- public async Text get_message_embedding_code (int64 chat_id, int64 message_id, bool for_album) throws TDLibError
Returns an HTML code for embedding the message. Available only if
messageProperties.can_get_embedding_code
- public async MessageFileType get_message_file_type (string message_file_head) throws TDLibError
Returns information about a file with messages exported from another
application
- public async Text get_message_import_confirmation_text (int64 chat_id) throws TDLibError
Returns a confirmation text to be shown to the user before starting
message import
- public async MessageLink get_message_link (int64 chat_id, int64 message_id, int32 media_timestamp, bool for_album, bool in_message_thread) throws TDLibError
Returns an HTTPS link to a message in a chat. Available only if
messageProperties.can_get_link, or if messageProperties.can_get_media_timestamp_links and a media timestamp link is generated. This is
an offline method
- public async MessageLinkInfo get_message_link_info (string url) throws TDLibError
Returns information about a public or private message link. Can be
called for any internal link of the type internalLinkTypeMessage
- public async Message get_message_locally (int64 chat_id, int64 message_id) throws TDLibError
Returns information about a message, if it is available without
sending network request. Returns a 404 error if message isn't available locally. This is an offline method
- public async MessageProperties get_message_properties (int64 chat_id, int64 message_id) throws TDLibError
Returns properties of a message. This is an offline method
- public async PublicForwards get_message_public_forwards (int64 chat_id, int64 message_id, string offset, int32 limit) throws TDLibError
Returns forwarded copies of a channel message to different public
channels and public reposts as a story. Can be used only if messageProperties.can_get_statistics == true. For optimal performance, the
number of returned messages and stories is chosen by TDLib
- public async MessageReadDate get_message_read_date (int64 chat_id, int64 message_id) throws TDLibError
Returns read date of a recent outgoing message in a private chat. The
method can be called if messageProperties.can_get_read_date == true
- public async MessageStatistics get_message_statistics (int64 chat_id, int64 message_id, bool is_dark) throws TDLibError
Returns detailed statistics about a message. Can be used only if
messageProperties.can_get_statistics == true
- public async MessageThreadInfo get_message_thread (int64 chat_id, int64 message_id) throws TDLibError
Returns information about a message thread. Can be used only if
messageProperties.can_get_message_thread == true
- public async Messages get_message_thread_history (int64 chat_id, int64 message_id, int64 from_message_id, int32 offset, int32 limit) throws TDLibError
Returns messages in a message thread of a message. Can be used only if
messageProperties.can_get_message_thread == true. Message thread of a channel message is in the channel's linked supergroup. The
messages are returned in reverse chronological order (i.e., in order of decreasing message_id). For optimal performance, the number of
returned messages is chosen by TDLib
- public async MessageViewers get_message_viewers (int64 chat_id, int64 message_id) throws TDLibError
Returns viewers of a recent outgoing message in a basic group or a
supergroup chat. For video notes and voice notes only users, opened content of the message, are returned. The method can be called if
messageProperties.can_get_viewers == true
- public async Messages get_messages (int64 chat_id, ArrayList<int64?> message_ids) throws TDLibError
Returns information about messages. If a message is not found, returns
null on the corresponding position of the result
- public async NetworkStatistics get_network_statistics (bool only_current) throws TDLibError
Returns network data usage statistics. Can be called before
authorization
- public async NewChatPrivacySettings get_new_chat_privacy_settings () throws TDLibError
Returns privacy settings for new chat creation
- public async OptionValue get_option (string name) throws TDLibError
Returns the value of an option by its name. (Check the list of
available options on https://core.telegram.org/tdlib/options.)
Can be called before authorization. Can be called synchronously for options "version" and "commit_hash"
- public OptionValue get_option_sync (string name) throws TDLibError
Returns the value of an option by its name. (Check the list of
available options on https://core.telegram.org/tdlib/options.)
Can be called before authorization. Can be called synchronously for options "version" and "commit_hash"
- public async Users get_owned_bots () throws TDLibError
Returns the list of bots owned by the current user
- public async StickerSets get_owned_sticker_sets (int64 offset_sticker_set_id, int32 limit) throws TDLibError
Returns sticker sets owned by the current user
- public async StarCount get_paid_message_revenue (int64 user_id) throws TDLibError
Returns the total number of Telegram Stars received by the current
user for paid messages from the given user
- public async PassportAuthorizationForm get_passport_authorization_form (int64 bot_user_id, string scope, string public_key, string nonce) throws TDLibError
Returns a Telegram Passport authorization form for sharing data with a
service
- public async PassportElementsWithErrors get_passport_authorization_form_available_elements (int32 authorization_form_id, string password) throws TDLibError
Returns already available Telegram Passport elements suitable for
completing a Telegram Passport authorization form. Result can be received only once for each authorization form
- public async PassportElement get_passport_element (PassportElementType type_, string password) throws TDLibError
Returns one of the available Telegram Passport elements
- public async PasswordState get_password_state () throws TDLibError
Returns the current state of 2-step verification
- public async PaymentForm get_payment_form (InputInvoice input_invoice, ThemeParameters theme) throws TDLibError
Returns an invoice payment form. This method must be called when the
user presses inline button of the type inlineKeyboardButtonTypeBuy, or wants to buy access to media in a messagePaidMedia message
- public async PaymentReceipt get_payment_receipt (int64 chat_id, int64 message_id) throws TDLibError
Returns information about a successful payment
- public async PhoneNumberInfo get_phone_number_info (string phone_number_prefix) throws TDLibError
Returns information about a phone number by its prefix. Can be called
before authorization
- public async PhoneNumberInfo get_phone_number_info_sync (string language_code, string phone_number_prefix) throws TDLibError
Returns information about a phone number by its prefix synchronously.
Client.get_countries must be called at least once after changing
localization to the specified language if properly localized country information is expected. Can be called synchronously
- public PhoneNumberInfo get_phone_number_info_sync_sync (string language_code, string phone_number_prefix) throws TDLibError
Returns information about a phone number by its prefix synchronously.
Client.get_countries must be called at least once after changing
localization to the specified language if properly localized country information is expected. Can be called synchronously
- public async MessageSenders get_poll_voters (int64 chat_id, int64 message_id, int32 option_id, int32 offset, int32 limit) throws TDLibError
Returns message senders voted for the specified option in a non-
anonymous polls. For optimal performance, the number of returned users is chosen by TDLib
- public async Text get_preferred_country_language (string country_code) throws TDLibError
Returns an IETF language tag of the language preferred in the country,
which must be used to fill native fields in Telegram Passport personal details. Returns a 404 error if unknown
- public async PremiumFeatures get_premium_features (PremiumSource source) throws TDLibError
Returns information about features, available to Premium users
- public async PremiumGiftPaymentOptions get_premium_gift_payment_options () throws TDLibError
Returns available options for gifting Telegram Premium to a user
- public async PremiumGiveawayPaymentOptions get_premium_giveaway_payment_options (int64 boosted_chat_id) throws TDLibError
Returns available options for creating of Telegram Premium giveaway or
manual distribution of Telegram Premium among chat members
- public async Sticker get_premium_info_sticker (int32 month_count) throws TDLibError
Returns the sticker to be used as representation of the Telegram
Premium subscription
- public async PremiumLimit get_premium_limit (PremiumLimitType limit_type) throws TDLibError
Returns information about a limit, increased for Premium users.
Returns a 404 error if the limit is unknown
- public async PremiumState get_premium_state () throws TDLibError
Returns state of Telegram Premium subscription and promotion videos
for Premium features
- public async Stickers get_premium_sticker_examples () throws TDLibError
Returns examples of premium stickers for demonstration purposes
- public async Stickers get_premium_stickers (int32 limit) throws TDLibError
Returns premium stickers from regular sticker sets
- public async PreparedInlineMessage get_prepared_inline_message (int64 bot_user_id, string prepared_message_id) throws TDLibError
Saves an inline message to be sent by the given user
- public async Proxies get_proxies () throws TDLibError
Returns the list of proxies that are currently set up. Can be called
before authorization
- public async HttpUrl get_proxy_link (int32 proxy_id) throws TDLibError
Returns an HTTPS link, which can be used to add a proxy. Available
only for SOCKS5 and MTProto proxies. Can be called before authorization
- public async PushReceiverId get_push_receiver_id (string payload) throws TDLibError
Returns a globally unique push notification subscription identifier
for identification of an account, which has received a push notification. Can be called synchronously
- public PushReceiverId get_push_receiver_id_sync (string payload) throws TDLibError
Returns a globally unique push notification subscription identifier
for identification of an account, which has received a push notification. Can be called synchronously
- public async ReadDatePrivacySettings get_read_date_privacy_settings () throws TDLibError
Returns privacy settings for message read date
- public async ReceivedGift get_received_gift (string received_gift_id) throws TDLibError
Returns information about a received gift
- public async ReceivedGifts get_received_gifts (string business_connection_id, MessageSender owner_id, bool exclude_unsaved, bool exclude_saved, bool exclude_unlimited, bool exclude_limited, bool exclude_upgraded, bool sort_by_price, string offset, int32 limit) throws TDLibError
Returns gifts received by the given user or chat
- public async EmojiStatuses get_recent_emoji_statuses () throws TDLibError
Returns recent emoji statuses for self status
- public async Users get_recent_inline_bots () throws TDLibError
Returns up to 20 recently used inline bots in the order of their last
usage
- public async Stickers get_recent_stickers (bool is_attached) throws TDLibError
Returns a list of recently used stickers
- public async Chats get_recently_opened_chats (int32 limit) throws TDLibError
Returns recently opened chats. This is an offline method. Returns
chats in the order of last opening
- public async TMeUrls get_recently_visited_t_me_urls (string referrer) throws TDLibError
Returns t.me URLs recently visited by a newly registered user
- public async RecommendedChatFolders get_recommended_chat_folders () throws TDLibError
Returns recommended chat folders for the current user
- public async Chats get_recommended_chats () throws TDLibError
Returns a list of channel chats recommended to the current user
- public async RecoveryEmailAddress get_recovery_email_address (string password) throws TDLibError
Returns a 2-step verification recovery email address that was
previously set up. This method can be used to verify a password provided by the user
- public async File get_remote_file (string remote_file_id, FileType file_type) throws TDLibError
Returns information about a file by its remote identifier. This is an
offline method. Can be used to register a URL as a file for further uploading, or sending as a message. Even the request succeeds, the
file can be used only if it is still accessible to the user. For example, if the file is from a message, then the message must be not
deleted and accessible to the user. If the file database is disabled, then the corresponding object with the file must be preloaded by
the application
- public async Message get_replied_message (int64 chat_id, int64 message_id) throws TDLibError
Returns information about a non-bundled message that is replied by a
given message. Also, returns the pinned message, the game message, the invoice message, the message with a previously set same
background, the giveaway message, and the topic creation message for messages of the types messagePinMessage, messageGameScore,
messagePaymentSuccessful, messageChatSetBackground, messageGiveawayCompleted and topic messages without non-bundled replied message
respectively. Returns a 404 error if the message doesn't exist
- public async Animations get_saved_animations () throws TDLibError
Returns saved animations
- public async SavedMessagesTags get_saved_messages_tags (int64 saved_messages_topic_id) throws TDLibError
Returns tags used in Saved Messages or a Saved Messages topic
- public async Messages get_saved_messages_topic_history (int64 saved_messages_topic_id, int64 from_message_id, int32 offset, int32 limit) throws TDLibError
Returns messages in a Saved Messages topic. The messages are returned
in reverse chronological order (i.e., in order of decreasing message_id)
- public async Message get_saved_messages_topic_message_by_date (int64 saved_messages_topic_id, int32 date) throws TDLibError
Returns the last message sent in a Saved Messages topic no later than
the specified date
- public async NotificationSounds get_saved_notification_sound (int64 notification_sound_id) throws TDLibError
Returns saved notification sound by its identifier. Returns a 404
error if there is no saved notification sound with the specified identifier
- public async NotificationSounds get_saved_notification_sounds () throws TDLibError
Returns the list of saved notification sounds. If a sound isn't in the
list, then default sound needs to be used
- public async OrderInfo get_saved_order_info () throws TDLibError
Returns saved order information. Returns a 404 error if there is no
saved order information
- public async ScopeNotificationSettings get_scope_notification_settings (NotificationSettingsScope scope) throws TDLibError
Returns the notification settings for chats of a given type
- public async SponsoredChats get_search_sponsored_chats (string query) throws TDLibError
Returns sponsored chats to be shown in the search results
- public async Hashtags get_searched_for_tags (string tag_prefix, int32 limit) throws TDLibError
Returns recently searched for hashtags or cashtags by their prefix
- public async SecretChat get_secret_chat (int32 secret_chat_id) throws TDLibError
Returns information about a secret chat by its identifier. This is an
offline method
- public async HttpUrl get_star_ad_account_url (MessageSender owner_id) throws TDLibError
Returns a URL for a Telegram Ad platform account that can be used to
set up advertisements for the chat paid in the owned Telegram Stars
- public async StarPaymentOptions get_star_gift_payment_options (int64 user_id) throws TDLibError
Returns available options for Telegram Stars gifting
- public async StarGiveawayPaymentOptions get_star_giveaway_payment_options () throws TDLibError
Returns available options for Telegram Star giveaway creation
- public async StarPaymentOptions get_star_payment_options () throws TDLibError
Returns available options for Telegram Stars purchase
- public async StarRevenueStatistics get_star_revenue_statistics (MessageSender owner_id, bool is_dark) throws TDLibError
Returns detailed Telegram Star revenue statistics
- public async StarSubscriptions get_star_subscriptions (bool only_expiring, string offset) throws TDLibError
Returns the list of Telegram Star subscriptions for the current user
- public async StarTransactions get_star_transactions (MessageSender owner_id, string subscription_id, StarTransactionDirection direction, string offset, int32 limit) throws TDLibError
Returns the list of Telegram Star transactions for the specified owner
- public async HttpUrl get_star_withdrawal_url (MessageSender owner_id, int64 star_count, string password) throws TDLibError
Returns a URL for Telegram Star withdrawal
- public async StatisticalGraph get_statistical_graph (int64 chat_id, string token, int64 x) throws TDLibError
Loads an asynchronous or a zoomed in statistical graph
- public async Emojis get_sticker_emojis (InputFile sticker) throws TDLibError
Returns emoji corresponding to a sticker. The list is only for
informational purposes, because a sticker is always sent with a fixed emoji from the corresponding Sticker object
- public async Outline get_sticker_outline (int32 sticker_file_id, bool for_animated_emoji, bool for_clicked_animated_emoji_message) throws TDLibError
Returns outline of a sticker. This is an offline method. Returns a 404
error if the outline isn't known
- public async StickerSet get_sticker_set (int64 set_id) throws TDLibError
Returns information about a sticker set by its identifier
- public async Text get_sticker_set_name (int64 set_id) throws TDLibError
Returns name of a sticker set by its identifier
- public async Stickers get_stickers (StickerType sticker_type, string query, int32 limit, int64 chat_id) throws TDLibError
Returns stickers from the installed sticker sets that correspond to
any of the given emoji or can be found by sticker-specific keywords. If the query is non-empty, then favorite, recently used or
trending stickers may also be returned
- public async StorageStatistics get_storage_statistics (int32 chat_limit) throws TDLibError
Returns storage usage statistics. Can be called before authorization
- public async StorageStatisticsFast get_storage_statistics_fast () throws TDLibError
Quickly returns approximate storage usage statistics. Can be called
before authorization
- public async Story get_story (int64 story_poster_chat_id, int32 story_id, bool only_local) throws TDLibError
Returns a story
- public async AvailableReactions get_story_available_reactions (int32 row_size) throws TDLibError
Returns reactions, which can be chosen for a story
- public async StoryInteractions get_story_interactions (int32 story_id, string query, bool only_contacts, bool prefer_forwards, bool prefer_with_reaction, string offset, int32 limit) throws TDLibError
Returns interactions with a story. The method can be called only for
stories posted on behalf of the current user
- public async Chats get_story_notification_settings_exceptions () throws TDLibError
Returns the list of chats with non-default notification settings for
stories
- public async PublicForwards get_story_public_forwards (int64 story_poster_chat_id, int32 story_id, string offset, int32 limit) throws TDLibError
Returns forwards of a story as a message to public chats and reposts
by public channels. Can be used only if the story is posted on behalf of the current user or story.can_get_statistics == true. For
optimal performance, the number of returned messages and stories is chosen by TDLib
- public async StoryStatistics get_story_statistics (int64 chat_id, int32 story_id, bool is_dark) throws TDLibError
Returns detailed statistics about a story. Can be used only if
story.can_get_statistics == true
- public async Text get_suggested_file_name (int32 file_id, string directory) throws TDLibError
Returns suggested name for saving a file in a given directory
- public async Text get_suggested_sticker_set_name (string title) throws TDLibError
Returns a suggested name for a new sticker set with a given title
- public async Chats get_suitable_discussion_chats () throws TDLibError
Returns a list of basic group and supergroup chats, which can be used
as a discussion group for a channel. Returned basic group chats must be first upgraded to supergroups before they can be set as a
discussion group. To set a returned supergroup as a discussion group, access to its old messages must be enabled using
Client.toggle_supergroup_is_all_history_available first
- public async Chats get_suitable_personal_chats () throws TDLibError
Returns a list of channel chats, which can be used as a personal chat
- public async Supergroup get_supergroup (int64 supergroup_id) throws TDLibError
Returns information about a supergroup or a channel by its identifier.
This is an offline method if the current user is not a bot
- public async SupergroupFullInfo get_supergroup_full_info (int64 supergroup_id) throws TDLibError
Returns full information about a supergroup or a channel by its
identifier, cached for up to 1 minute
- public async ChatMembers get_supergroup_members (int64 supergroup_id, SupergroupMembersFilter filter, int32 offset, int32 limit) throws TDLibError
Returns information about members or banned users in a supergroup or
channel. Can be used only if supergroupFullInfo.can_get_members == true; additionally, administrator privileges may be required for
some filters
- public async Text get_support_name () throws TDLibError
Returns localized name of the Telegram support user; for Telegram
support only
- public async User get_support_user () throws TDLibError
Returns a user that can be contacted to get support
- public async TemporaryPasswordState get_temporary_password_state () throws TDLibError
Returns information about the current temporary password
- public async TextEntities get_text_entities (string text) throws TDLibError
Returns all entities (mentions, hashtags, cashtags, bot commands, bank
card numbers, URLs, and email addresses) found in the text. Can be called synchronously
- public TextEntities get_text_entities_sync (string text) throws TDLibError
Returns all entities (mentions, hashtags, cashtags, bot commands, bank
card numbers, URLs, and email addresses) found in the text. Can be called synchronously
- public async Text get_theme_parameters_json_string (ThemeParameters theme) throws TDLibError
Converts a themeParameters object to corresponding JSON-serialized
string. Can be called synchronously
- public Text get_theme_parameters_json_string_sync (ThemeParameters theme) throws TDLibError
Converts a themeParameters object to corresponding JSON-serialized
string. Can be called synchronously
- public async EmojiStatusCustomEmojis get_themed_chat_emoji_statuses () throws TDLibError
Returns up to 8 emoji statuses, which must be shown in the emoji
status list for chats
- public async EmojiStatusCustomEmojis get_themed_emoji_statuses () throws TDLibError
Returns up to 8 emoji statuses, which must be shown right after the
default Premium Badge in the emoji status list for self status
- public async TimeZones get_time_zones () throws TDLibError
Returns the list of supported time zones
- public async Chats get_top_chats (TopChatCategory category, int32 limit) throws TDLibError
Returns a list of frequently used chats
- public async TrendingStickerSets get_trending_sticker_sets (StickerType sticker_type, int32 offset, int32 limit) throws TDLibError
Returns a list of trending sticker sets. For optimal performance, the
number of returned sticker sets is chosen by TDLib
- public async UpgradedGift get_upgraded_gift (string name) throws TDLibError
Returns information about an upgraded gift by its name
- public async EmojiStatuses get_upgraded_gift_emoji_statuses () throws TDLibError
Returns available upgraded gift emoji statuses for self status
- public async HttpUrl get_upgraded_gift_withdrawal_url (string received_gift_id, string password) throws TDLibError
Returns a URL for upgraded gift withdrawal in the TON blockchain as an
NFT; requires owner privileges for gifts owned by a chat
- public async User get_user (int64 user_id) throws TDLibError
Returns information about a user by their identifier. This is an
offline method if the current user is not a bot
- public async FoundChatBoosts get_user_chat_boosts (int64 chat_id, int64 user_id) throws TDLibError
Returns the list of boosts applied to a chat by a given user; requires
administrator rights in the chat; for bots only
- public async UserFullInfo get_user_full_info (int64 user_id) throws TDLibError
Returns full information about a user by their identifier
- public async UserLink get_user_link () throws TDLibError
Returns an HTTPS link, which can be used to get information about the
current user
- public async UserPrivacySettingRules get_user_privacy_setting_rules (UserPrivacySetting setting) throws TDLibError
Returns the current privacy settings
- public async ChatPhotos get_user_profile_photos (int64 user_id, int32 offset, int32 limit) throws TDLibError
Returns the profile photos of a user. Personal and public photo aren't
returned
- public async UserSupportInfo get_user_support_info (int64 user_id) throws TDLibError
Returns support information for the given user; for Telegram support
only
- public async MessageSenders get_video_chat_available_participants (int64 chat_id) throws TDLibError
Returns the list of participant identifiers, on whose behalf a video
chat in the chat can be joined
- public async HttpUrl get_video_chat_invite_link (int32 group_call_id, bool can_self_unmute) throws TDLibError
Returns invite link to a video chat in a public chat
- public async RtmpUrl get_video_chat_rtmp_url (int64 chat_id) throws TDLibError
Returns RTMP URL for streaming to the video chat of a chat; requires
can_manage_video_chats administrator right
- public async Data get_video_chat_stream_segment (int32 group_call_id, int64 time_offset, int32 scale, int32 channel_id, GroupCallVideoQuality video_quality) throws TDLibError
Returns a file with a segment of a video chat stream in a modified OGG
format for audio or MPEG-4 format for video
- public async VideoChatStreams get_video_chat_streams (int32 group_call_id) throws TDLibError
Returns information about available video chat streams
- public async HttpUrl get_web_app_link_url (int64 chat_id, int64 bot_user_id, string web_app_short_name, string start_parameter, bool allow_write_access, WebAppOpenParameters parameters) throws TDLibError
Returns an HTTPS URL of a Web App to open after a link of the type
internalLinkTypeWebApp is clicked
- public async Outline get_web_app_placeholder (int64 bot_user_id) throws TDLibError
Returns a default placeholder for Web Apps of a bot. This is an
offline method. Returns a 404 error if the placeholder isn't known
- public async HttpUrl get_web_app_url (int64 bot_user_id, string url, WebAppOpenParameters parameters) throws TDLibError
Returns an HTTPS URL of a Web App to open from the side menu, a
keyboardButtonTypeWebApp button, or an inlineQueryResultsButtonTypeWebApp button
- public async WebPageInstantView get_web_page_instant_view (string url, bool only_local) throws TDLibError
Returns an instant view version of a web page if available. This is an
offline method if only_local is true. Returns a 404 error if the web page has no instant view page
- public async Ok gift_premium_with_stars (int64 user_id, int64 star_count, int32 month_count, FormattedText text) throws TDLibError
Allows to buy a Telegram Premium subscription for another user with
payment in Telegram Stars; for bots only
- public async Ok hide_contact_close_birthdays () throws TDLibError
Hides the list of contacts that have
Client.close birthdays for 24 hours
- public async Ok hide_suggested_action (SuggestedAction action) throws TDLibError
Hides a suggested action
- public async ImportedContacts import_contacts (ArrayList<Contact?> contacts) throws TDLibError
Adds new contacts or edits existing contacts by their phone numbers;
contacts' user identifiers are ignored
- public async Ok import_messages (int64 chat_id, InputFile message_file, ArrayList<InputFile?> attached_files) throws TDLibError
Imports messages exported from another app
- public void init () throws TDLibError
Init client: create request manager and set client_id
- public async InviteGroupCallParticipantResult invite_group_call_participant (int32 group_call_id, int64 user_id, bool is_video) throws TDLibError
Invites a user to an active group call; for group calls not bound to a
chat only. Sends a service message of the type messageGroupCall. The group call can have at most
getOption("group_call_participant_count_max") participants
- public async Ok invite_video_chat_participants (int32 group_call_id, ArrayList<int64?> user_ids) throws TDLibError
Invites users to an active video chat. Sends a service message of the
type messageInviteVideoChatParticipants to the chat bound to the group call
- public async Ok join_chat (int64 chat_id) throws TDLibError
Adds the current user as a new member to a chat. Private and secret
chats can't be joined using this method. May return an error with a message "INVITE_REQUEST_SENT" if only a join request was created
- public async Chat join_chat_by_invite_link (string invite_link) throws TDLibError
Uses an invite link to add the current user to the chat if possible.
May return an error with a message "INVITE_REQUEST_SENT" if only a join request was created
- public async GroupCallInfo join_group_call (InputGroupCall input_group_call, GroupCallJoinParameters join_parameters) throws TDLibError
Joins a group call that is not bound to a chat
- public async Text join_video_chat (int32 group_call_id, MessageSender participant_id, GroupCallJoinParameters join_parameters, string invite_hash) throws TDLibError
Joins an active video chat. Returns join response payload for tgcalls
- public async Ok launch_prepaid_giveaway (int64 giveaway_id, GiveawayParameters parameters, int32 winner_count, int64 star_count) throws TDLibError
Launches a prepaid giveaway
- public async Ok leave_chat (int64 chat_id) throws TDLibError
Removes the current user from chat members. Private and secret chats
can't be left using this method
- public async Ok leave_group_call (int32 group_call_id) throws TDLibError
Leaves a group call
- public async Ok load_active_stories (StoryList story_list) throws TDLibError
Loads more active stories from a story list. The loaded stories will
be sent through updates. Active stories are sorted by the pair (active_stories.order, active_stories.story_poster_chat_id) in
descending order. Returns a 404 error if all active stories have been loaded
- public async Ok load_chats (ChatList chat_list, int32 limit) throws TDLibError
Loads more chats from a chat list. The loaded chats and their
positions in the chat list will be sent through updates. Chats are sorted by the pair (chat.position.order, chat.id) in descending
order. Returns a 404 error if all chats have been loaded
- public async Ok load_group_call_participants (int32 group_call_id, int32 limit) throws TDLibError
Loads more participants of a group call. The loaded participants will
be received through updates. Use the field groupCall.loaded_all_participants to check whether all participants have already been
loaded
- public async Ok load_quick_reply_shortcut_messages (int32 shortcut_id) throws TDLibError
Loads quick reply messages that can be sent by a given quick reply
shortcut. The loaded messages will be sent through updateQuickReplyShortcutMessages
- public async Ok load_quick_reply_shortcuts () throws TDLibError
Loads quick reply shortcuts created by the current user. The loaded
data will be sent through updateQuickReplyShortcut and updateQuickReplyShortcuts
- public async Ok load_saved_messages_topics (int32 limit) throws TDLibError
Loads more Saved Messages topics. The loaded topics will be sent
through updateSavedMessagesTopic. Topics are sorted by their topic.order in descending order. Returns a 404 error if all topics have
been loaded
- public async Ok log_out () throws TDLibError
Closes the TDLib instance after a proper logout. Requires an available
network connection. All local data will be destroyed. After the logout completes, updateAuthorizationState with
authorizationStateClosed will be sent
- public async Ok open_bot_similar_bot (int64 bot_user_id, int64 opened_bot_user_id) throws TDLibError
Informs TDLib that a bot was opened from the list of similar bots
- public async Ok open_chat (int64 chat_id) throws TDLibError
Informs TDLib that the chat is opened by the user. Many useful
activities depend on the chat being opened or closed (e.g., in supergroups and channels all updates are received only for opened
chats)
- public async Ok open_chat_similar_chat (int64 chat_id, int64 opened_chat_id) throws TDLibError
- public async Ok open_message_content (int64 chat_id, int64 message_id) throws TDLibError
Informs TDLib that the message content has been opened (e.g., the user
has opened a photo, video, document, location or venue, or has listened to an audio file or voice note message). An
updateMessageContentOpened update will be generated if something has changed
- public async Ok open_sponsored_chat (int64 sponsored_chat_unique_id) throws TDLibError
Informs TDLib that the user opened a sponsored chat
- public async Ok open_story (int64 story_poster_chat_id, int32 story_id) throws TDLibError
Informs TDLib that a story is opened and is being viewed by the user
- public async WebAppInfo open_web_app (int64 chat_id, int64 bot_user_id, string url, int64 message_thread_id, InputMessageReplyTo reply_to, WebAppOpenParameters parameters) throws TDLibError
Informs TDLib that a Web App is being opened from the attachment menu,
a botMenuButton button, an internalLinkTypeAttachmentMenuBot link, or an inlineKeyboardButtonTypeWebApp button. For each bot, a
confirmation alert about data sent to the bot must be shown once
- public async StorageStatistics optimize_storage (int64 size, int32 ttl, int32 count, int32 immunity_delay, ArrayList<FileType?> file_types, ArrayList<int64?> chat_ids, ArrayList<int64?> exclude_chat_ids, bool return_deleted_file_statistics, int32 chat_limit) throws TDLibError
Optimizes storage usage, i.e. deletes some files and returns new
storage usage statistics. Secret thumbnails can't be deleted
- public async FormattedText parse_markdown (FormattedText text) throws TDLibError
Parses Markdown entities in a human-friendly format, ignoring markup
errors. Can be called synchronously
- public FormattedText parse_markdown_sync (FormattedText text) throws TDLibError
Parses Markdown entities in a human-friendly format, ignoring markup
errors. Can be called synchronously
- public async FormattedText parse_text_entities (string text, TextParseMode parse_mode) throws TDLibError
Parses Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji,
BlockQuote, ExpandableBlockQuote, Code, Pre, PreCode, TextUrl and MentionName entities from a marked-up text. Can be called
synchronously
- public FormattedText parse_text_entities_sync (string text, TextParseMode parse_mode) throws TDLibError
Parses Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji,
BlockQuote, ExpandableBlockQuote, Code, Pre, PreCode, TextUrl and MentionName entities from a marked-up text. Can be called
synchronously
- public async Ok pin_chat_message (int64 chat_id, int64 message_id, bool disable_notification, bool only_for_self) throws TDLibError
Pins a message in a chat. A message can be pinned only if
messageProperties.can_be_pinned
- public async Seconds ping_proxy (int32 proxy_id) throws TDLibError
Computes time needed to receive a response from a Telegram server
through a proxy. Can be called before authorization
- public async Story post_story (int64 chat_id, InputStoryContent content, InputStoryAreas areas, FormattedText caption, StoryPrivacySettings privacy_settings, int32 active_period, StoryFullId from_story_full_id, bool is_posted_to_chat_page, bool protect_content) throws TDLibError
Posts a new story on behalf of a chat; requires can_post_stories right
for supergroup and channel chats. Returns a temporary story
- public async File preliminary_upload_file (InputFile file, FileType file_type, int32 priority) throws TDLibError
Preliminary uploads a file to the cloud before sending it in a
message, which can be useful for uploading of being recorded voice and video notes. In all other cases there is no need to preliminary
upload a file. Updates updateFile will be used to notify about upload progress. The upload will not be completed until the file is
sent in a message
- public async Ok process_chat_folder_new_chats (int32 chat_folder_id, ArrayList<int64?> added_chat_ids) throws TDLibError
Process new chats added to a shareable chat folder by its owner
- public async Ok process_chat_join_request (int64 chat_id, int64 user_id, bool approve) throws TDLibError
Handles a pending join request in a chat
- public async Ok process_chat_join_requests (int64 chat_id, string invite_link, bool approve) throws TDLibError
Handles all pending join requests for a given link in a chat
- public async Ok process_push_notification (string payload) throws TDLibError
Handles a push notification. Returns error with code 406 if the push
notification is not supported and connection to the server is required to fetch new data. Can be called before authorization
- public async Ok rate_speech_recognition (int64 chat_id, int64 message_id, bool is_good) throws TDLibError
Rates recognized speech in a video note or a voice note message
- public async Ok read_all_chat_mentions (int64 chat_id) throws TDLibError
Marks all mentions in a chat as read
- public async Ok read_all_chat_reactions (int64 chat_id) throws TDLibError
Marks all reactions in a chat or a forum topic as read
- public async Ok read_all_message_thread_mentions (int64 chat_id, int64 message_thread_id) throws TDLibError
Marks all mentions in a forum topic as read
- public async Ok read_all_message_thread_reactions (int64 chat_id, int64 message_thread_id) throws TDLibError
Marks all reactions in a forum topic as read
- public async Ok read_business_message (string business_connection_id, int64 chat_id, int64 message_id) throws TDLibError
Reads a message on behalf of a business account; for bots only
- public async Ok read_chat_list (ChatList chat_list) throws TDLibError
Traverse all chats in a chat list and marks all messages in the chats
as read
- public async Data read_file_part (int32 file_id, int64 offset, int64 count) throws TDLibError
Reads a part of a file from the TDLib file cache and returns read
bytes. This method is intended to be used only if the application has no direct access to TDLib's file system, because it is usually
slower than a direct read from the file
- public async QuickReplyMessages readd_quick_reply_shortcut_messages (string shortcut_name, ArrayList<int64?> message_ids) throws TDLibError
Readds quick reply messages which failed to add. Can be called only
for messages for which messageSendingStateFailed.can_retry is true and after specified in messageSendingStateFailed.retry_after time
passed. If a message is readded, the corresponding failed to send message is deleted. Returns the sent messages in the same order as
the message identifiers passed in message_ids. If a message can't be readded, null will be returned instead of the message
- public async Ok recognize_speech (int64 chat_id, int64 message_id) throws TDLibError
Recognizes speech in a video note or a voice note message
- public async Ok recover_authentication_password (string recovery_code, string new_password, string new_hint) throws TDLibError
Recovers the 2-step verification password with a password recovery
code sent to an email address that was previously set up. Works only when the current authorization state is
authorizationStateWaitPassword
- public async PasswordState recover_password (string recovery_code, string new_password, string new_hint) throws TDLibError
Recovers the 2-step verification password using a recovery code sent
to an email address that was previously set up
- public async Ok refund_star_payment (int64 user_id, string telegram_payment_charge_id) throws TDLibError
Refunds a previously done payment in Telegram Stars; for bots only
- public async PushReceiverId register_device (DeviceToken device_token, ArrayList<int64?> other_user_ids) throws TDLibError
Registers the currently used device for receiving push notifications.
Returns a globally unique identifier of the push notification subscription
- public async Ok register_user (string first_name, string last_name, bool disable_notification) throws TDLibError
Finishes user registration. Works only when the current authorization
state is authorizationStateWaitRegistration
- public async Ok remove_all_files_from_downloads (bool only_active, bool only_completed, bool delete_from_cache) throws TDLibError
Removes all files from the file download list
- public async Ok remove_business_connected_bot_from_chat (int64 chat_id) throws TDLibError
Removes the connected business bot from a specific chat by adding the
chat to businessRecipients.excluded_chat_ids
- public async Ok remove_chat_action_bar (int64 chat_id) throws TDLibError
Removes a chat action bar without any other action
- public async Ok remove_contacts (ArrayList<int64?> user_ids) throws TDLibError
Removes users from the contact list
- public async Ok remove_favorite_sticker (InputFile sticker) throws TDLibError
Removes a sticker from the list of favorite stickers
- public async Ok remove_file_from_downloads (int32 file_id, bool delete_from_cache) throws TDLibError
Removes a file from the file download list
- public async Ok remove_installed_background (int64 background_id) throws TDLibError
Removes background from the list of installed backgrounds
- public async Ok remove_message_reaction (int64 chat_id, int64 message_id, ReactionType reaction_type) throws TDLibError
Removes a reaction from a message. A chosen reaction can always be
removed
- public async Ok remove_message_sender_bot_verification (int64 bot_user_id, MessageSender verified_id) throws TDLibError
Removes the verification status of a user or a chat by an owned bot
- public async Ok remove_notification (int32 notification_group_id, int32 notification_id) throws TDLibError
Removes an active notification from notification list. Needs to be
called only if the notification is removed by the current user
- public async Ok remove_notification_group (int32 notification_group_id, int32 max_notification_id) throws TDLibError
Removes a group of active notifications. Needs to be called only if
the notification group is removed by the current user
- public async Ok remove_pending_paid_message_reactions (int64 chat_id, int64 message_id) throws TDLibError
Removes all pending paid reactions on a message
- public async Ok remove_proxy (int32 proxy_id) throws TDLibError
Removes a proxy server. Can be called before authorization
- public async Ok remove_recent_hashtag (string hashtag) throws TDLibError
Removes a hashtag from the list of recently used hashtags
- public async Ok remove_recent_sticker (bool is_attached, InputFile sticker) throws TDLibError
Removes a sticker from the list of recently used stickers
- public async Ok remove_recently_found_chat (int64 chat_id) throws TDLibError
Removes a chat from the list of recently found chats
- public async Ok remove_saved_animation (InputFile animation) throws TDLibError
Removes an animation from the list of saved animations
- public async Ok remove_saved_notification_sound (int64 notification_sound_id) throws TDLibError
Removes a notification sound from the list of saved notification
sounds
- public async Ok remove_searched_for_tag (string tag) throws TDLibError
Removes a hashtag or a cashtag from the list of recently searched for
hashtags or cashtags
- public async Ok remove_sticker_from_set (InputFile sticker) throws TDLibError
Removes a sticker from the set to which it belongs. The sticker set
must be owned by the current user
- public async Ok remove_top_chat (TopChatCategory category, int64 chat_id) throws TDLibError
Removes a chat from the list of frequently used chats. Supported only
if the chat info database is enabled
- public async Ok reorder_active_usernames (ArrayList<string?> usernames) throws TDLibError
Changes order of active usernames of the current user
- public async Ok reorder_bot_active_usernames (int64 bot_user_id, ArrayList<string?> usernames) throws TDLibError
Changes order of active usernames of a bot. Can be called only if
userTypeBot.can_be_edited == true
- public async Ok reorder_bot_media_previews (int64 bot_user_id, string language_code, ArrayList<int32?> file_ids) throws TDLibError
Changes order of media previews in the list of media previews of a bot
- public async Ok reorder_chat_folders (ArrayList<int32?> chat_folder_ids, int32 main_chat_list_position) throws TDLibError
Changes the order of chat folders
- public async Ok reorder_installed_sticker_sets (StickerType sticker_type, ArrayList<int64?> sticker_set_ids) throws TDLibError
Changes the order of installed sticker sets
- public async Ok reorder_quick_reply_shortcuts (ArrayList<int32?> shortcut_ids) throws TDLibError
Changes the order of quick reply shortcuts
- public async Ok reorder_supergroup_active_usernames (int64 supergroup_id, ArrayList<string?> usernames) throws TDLibError
Changes order of active usernames of a supergroup or channel, requires
owner privileges in the supergroup or channel
- public async ChatInviteLink replace_primary_chat_invite_link (int64 chat_id) throws TDLibError
Replaces current primary invite link for a chat with a new primary
invite link. Available for basic groups, supergroups, and channels. Requires administrator privileges and can_invite_users right
- public async Ok replace_sticker_in_set (int64 user_id, string name, InputFile old_sticker, InputSticker new_sticker) throws TDLibError
- public async RtmpUrl replace_video_chat_rtmp_url (int64 chat_id) throws TDLibError
Replaces the current RTMP URL for streaming to the video chat of a
chat; requires owner privileges in the chat
- public async Ok report_authentication_code_missing (string mobile_network_code) throws TDLibError
Reports that authentication code wasn't delivered via SMS; for
official mobile applications only. Works only when the current authorization state is authorizationStateWaitCode
- public async ReportChatResult report_chat (int64 chat_id, Bytes option_id, ArrayList<int64?> message_ids, string text) throws TDLibError
Reports a chat to the Telegram moderators. A chat can be reported only
from the chat action bar, or if chat.can_be_reported
- public async Ok report_chat_photo (int64 chat_id, int32 file_id, ReportReason reason, string text) throws TDLibError
Reports a chat photo to the Telegram moderators. A chat photo can be
reported only if chat.can_be_reported
- public async ReportSponsoredResult report_chat_sponsored_message (int64 chat_id, int64 message_id, Bytes option_id) throws TDLibError
Reports a sponsored message to Telegram moderators
- public async Ok report_message_reactions (int64 chat_id, int64 message_id, MessageSender sender_id) throws TDLibError
Reports reactions set on a message to the Telegram moderators.
Reactions on a message can be reported only if messageProperties.can_report_reactions
- public async Ok report_phone_number_code_missing (string mobile_network_code) throws TDLibError
Reports that authentication code wasn't delivered via SMS to the
specified phone number; for official mobile applications only
- public async ReportSponsoredResult report_sponsored_chat (int64 sponsored_chat_unique_id, Bytes option_id) throws TDLibError
Reports a sponsored chat to Telegram moderators
- public async ReportStoryResult report_story (int64 story_poster_chat_id, int32 story_id, Bytes option_id, string text) throws TDLibError
Reports a story to the Telegram moderators
- public async Ok report_supergroup_anti_spam_false_positive (int64 supergroup_id, int64 message_id) throws TDLibError
Reports a false deletion of a message by aggressive anti-spam checks;
requires administrator rights in the supergroup. Can be called only for messages from chatEventMessageDeleted with
can_report_anti_spam_false_positive == true
- public async Ok report_supergroup_spam (int64 supergroup_id, ArrayList<int64?> message_ids) throws TDLibError
Reports messages in a supergroup as spam; requires administrator
rights in the supergroup
- public async Ok request_authentication_password_recovery () throws TDLibError
Requests to send a 2-step verification password recovery code to an
email address that was previously set up. Works only when the current authorization state is authorizationStateWaitPassword
- public async EmailAddressAuthenticationCodeInfo request_password_recovery () throws TDLibError
Requests to send a 2-step verification password recovery code to an
email address that was previously set up
- public async Ok request_qr_code_authentication (ArrayList<int64?> other_user_ids) throws TDLibError
Requests QR code authentication by scanning a QR code on another
logged in device. Works only when the current authorization state is authorizationStateWaitPhoneNumber, or if there is no pending
authentication query and the current authorization state is authorizationStateWaitPremiumPurchase, authorizationStateWaitEmailAddress,
authorizationStateWaitEmailCode, authorizationStateWaitCode, authorizationStateWaitRegistration, or authorizationStateWaitPassword
- public async Ok resend_authentication_code (ResendCodeReason reason) throws TDLibError
Resends an authentication code to the user. Works only when the
current authorization state is authorizationStateWaitCode, the next_code_type of the result is not null and the server-specified
timeout has passed, or when the current authorization state is authorizationStateWaitEmailCode
- public async EmailAddressAuthenticationCodeInfo resend_email_address_verification_code () throws TDLibError
Resends the code to verify an email address to be added to a user's
Telegram Passport
- public async EmailAddressAuthenticationCodeInfo resend_login_email_address_code () throws TDLibError
Resends the login email address verification code
- public async Messages resend_messages (int64 chat_id, ArrayList<int64?> message_ids, InputTextQuote quote, int64 paid_message_star_count) throws TDLibError
Resends messages which failed to send. Can be called only for messages
for which messageSendingStateFailed.can_retry is true and after specified in messageSendingStateFailed.retry_after time passed. If a
message is re-sent, the corresponding failed to send message is deleted. Returns the sent messages in the same order as the message
identifiers passed in message_ids. If a message can't be re-sent, null will be returned instead of the message
- public async AuthenticationCodeInfo resend_phone_number_code (ResendCodeReason reason) throws TDLibError
Resends the authentication code sent to a phone number. Works only if
the previously received authenticationCodeInfo next_code_type was not null and the server-specified timeout has passed
- public async PasswordState resend_recovery_email_address_code () throws TDLibError
Resends the 2-step verification recovery email address verification
code
- public async Ok reset_all_notification_settings () throws TDLibError
Resets all chat and scope notification settings to their default
values. By default, all chats are unmuted and message previews are shown
- public async Ok reset_authentication_email_address () throws TDLibError
Resets the login email address. May return an error with a message
"TASK_ALREADY_EXISTS" if reset is still pending. Works only when the current authorization state is authorizationStateWaitEmailCode
and authorization_state.can_reset_email_address == true
- public async Ok reset_installed_backgrounds () throws TDLibError
Resets list of installed backgrounds to its default value
- public async Ok reset_network_statistics () throws TDLibError
Resets all network data usage statistics to zero. Can be called before
authorization
- public async ResetPasswordResult reset_password () throws TDLibError
Removes 2-step verification password without previous password and
access to recovery email address. The password can't be reset immediately and the request needs to be repeated after the specified
time
- public async Ok reuse_star_subscription (string subscription_id) throws TDLibError
Reuses an active Telegram Star subscription to a channel chat and
joins the chat again
- public async ChatInviteLinks revoke_chat_invite_link (int64 chat_id, string invite_link) throws TDLibError
Revokes invite link for a chat. Available for basic groups,
supergroups, and channels. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges
for other links. If a primary link is revoked, then additionally to the revoked link returns new primary link
- public async Ok revoke_group_call_invite_link (int32 group_call_id) throws TDLibError
Revokes invite link for a group call. Requires
groupCall.can_be_managed right for video chats or groupCall.is_owned otherwise
- public async Ok save_application_log_event (string type_, int64 chat_id, JsonValue data) throws TDLibError
Saves application log event on the server. Can be called before
authorization
- public async PreparedInlineMessageId save_prepared_inline_message (int64 user_id, InputInlineQueryResult result, TargetChatTypes chat_types) throws TDLibError
Saves an inline message to be sent by the given user; for bots only
- public async FoundAffiliatePrograms search_affiliate_programs (AffiliateType affiliate, AffiliateProgramSortOrder sort_order, string offset, int32 limit) throws TDLibError
Searches affiliate programs that can be connected to the given
affiliate
- public async Background search_background (string name) throws TDLibError
Searches for a background by its name
- public async FoundMessages search_call_messages (string offset, int32 limit, bool only_missed) throws TDLibError
Searches for call and group call messages. Returns the results in
reverse chronological order (i.e., in order of decreasing message_id). For optimal performance, the number of returned messages is
chosen by TDLib
- public async Chat search_chat_affiliate_program (string username, string referrer) throws TDLibError
Searches a chat with an affiliate program. Returns the chat if found
and the program is active
- public async ChatMembers search_chat_members (int64 chat_id, string query, int32 limit, ChatMembersFilter filter) throws TDLibError
Searches for a specified query in the first name, last name and
usernames of the members of a specified chat. Requires administrator rights if the chat is a channel
- public async FoundChatMessages search_chat_messages (int64 chat_id, string query, MessageSender sender_id, int64 from_message_id, int32 offset, int32 limit, SearchMessagesFilter filter, int64 message_thread_id, int64 saved_messages_topic_id) throws TDLibError
Searches for messages with given words in the chat. Returns the
results in reverse chronological order, i.e. in order of decreasing message_id. Cannot be used in secret chats with a non-empty query
Client.search_secret_messages must be used instead), or without
an enabled message database. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the
specified limit. A combination of query, sender_id, filter and message_thread_id search criteria is expected to be supported, only if
it is required for Telegram official application implementation
- public async Messages search_chat_recent_location_messages (int64 chat_id, int32 limit) throws TDLibError
Returns information about the recent locations of chat members that
were sent to the chat. Returns up to 1 location message per user
- public async Chats search_chats (string query, int32 limit) throws TDLibError
Searches for the specified query in the title and username of already
known chats. This is an offline method. Returns chats in the order seen in the main chat list
- public async Chats search_chats_on_server (string query, int32 limit) throws TDLibError
Searches for the specified query in the title and username of already
known chats via request to the server. Returns chats in the order seen in the main chat list
- public async Users search_contacts (string query, int32 limit) throws TDLibError
Searches for the specified query in the first names, last names and
usernames of the known user contacts
- public async EmojiKeywords search_emojis (string text, ArrayList<string?> input_language_codes) throws TDLibError
Searches for emojis by keywords. Supported only if the file database
is enabled. Order of results is unspecified
- public async FoundFileDownloads search_file_downloads (string query, bool only_active, bool only_completed, string offset, int32 limit) throws TDLibError
Searches for files in the file download list or recently downloaded
files from the list
- public async GiftsForResale search_gifts_for_resale (int64 gift_id, GiftForResaleOrder order, ArrayList<UpgradedGiftAttributeId?> attributes, string offset, int32 limit) throws TDLibError
Returns upgraded gifts that can be bought from other owners
- public async Hashtags search_hashtags (string prefix, int32 limit) throws TDLibError
Searches for recently used hashtags by their prefix
- public async StickerSets search_installed_sticker_sets (StickerType sticker_type, string query, int32 limit) throws TDLibError
Searches for installed sticker sets by looking for specified query in
their title and name
- public async FoundMessages search_messages (ChatList chat_list, string query, string offset, int32 limit, SearchMessagesFilter filter, SearchMessagesChatTypeFilter chat_type_filter, int32 min_date, int32 max_date) throws TDLibError
Searches for messages in all chats except secret chats. Returns the
results in reverse chronological order (i.e., in order of decreasing (date, chat_id, message_id)). For optimal performance, the number
of returned messages is chosen by TDLib and can be smaller than the specified limit
- public async FoundMessages search_outgoing_document_messages (string query, int32 limit) throws TDLibError
Searches for outgoing messages with content of the type
messageDocument in all chats except secret chats. Returns the results in reverse chronological order
- public async Chat search_public_chat (string username) throws TDLibError
Searches a public chat by its username. Currently, only private chats,
supergroups and channels can be public. Returns the chat if found; otherwise, an error is returned
- public async Chats search_public_chats (string query) throws TDLibError
Searches public chats by looking for specified query in their username
and title. Currently, only private chats, supergroups and channels can be public. Returns a meaningful number of results. Excludes
private chats with contacts and chats from the chat list from the results
- public async FoundMessages search_public_messages_by_tag (string tag, string offset, int32 limit) throws TDLibError
Searches for public channel posts containing the given hashtag or
cashtag. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit
- public async FoundStories search_public_stories_by_location (LocationAddress address, string offset, int32 limit) throws TDLibError
Searches for public stories by the given address location. For optimal
performance, the number of returned stories is chosen by TDLib and can be smaller than the specified limit
- public async FoundStories search_public_stories_by_tag (int64 story_poster_chat_id, string tag, string offset, int32 limit) throws TDLibError
Searches for public stories containing the given hashtag or cashtag.
For optimal performance, the number of returned stories is chosen by TDLib and can be smaller than the specified limit
- public async FoundStories search_public_stories_by_venue (string venue_provider, string venue_id, string offset, int32 limit) throws TDLibError
Searches for public stories from the given venue. For optimal
performance, the number of returned stories is chosen by TDLib and can be smaller than the specified limit
- public async FoundPosition search_quote (FormattedText text, FormattedText quote, int32 quote_position) throws TDLibError
Searches for a given quote in a text. Returns found quote start
position in UTF-16 code units. Returns a 404 error if the quote is not found. Can be called synchronously
- public FoundPosition search_quote_sync (FormattedText text, FormattedText quote, int32 quote_position) throws TDLibError
Searches for a given quote in a text. Returns found quote start
position in UTF-16 code units. Returns a 404 error if the quote is not found. Can be called synchronously
- public async Chats search_recently_found_chats (string query, int32 limit) throws TDLibError
Searches for the specified query in the title and username of up to 50
recently found chats. This is an offline method
- public async FoundChatMessages search_saved_messages (int64 saved_messages_topic_id, ReactionType tag, string query, int64 from_message_id, int32 offset, int32 limit) throws TDLibError
Searches for messages tagged by the given reaction and with the given
words in the Saved Messages chat; for Telegram Premium users only. Returns the results in reverse chronological order, i.e. in order
of decreasing message_id. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the
specified limit
- public async FoundMessages search_secret_messages (int64 chat_id, string query, string offset, int32 limit, SearchMessagesFilter filter) throws TDLibError
Searches for messages in secret chats. Returns the results in reverse
chronological order. For optimal performance, the number of returned messages is chosen by TDLib
- public async StickerSet search_sticker_set (string name, bool ignore_cache) throws TDLibError
Searches for a sticker set by its name
- public async StickerSets search_sticker_sets (StickerType sticker_type, string query) throws TDLibError
Searches for sticker sets by looking for specified query in their
title and name. Excludes installed sticker sets from the results
- public async Stickers search_stickers (StickerType sticker_type, string emojis, string query, ArrayList<string?> input_language_codes, int32 offset, int32 limit) throws TDLibError
Searches for stickers from public sticker sets that correspond to any
of the given emoji
- public async FoundPositions search_strings_by_prefix (ArrayList<string?> strings, string query, int32 limit, bool return_none_for_empty_query) throws TDLibError
Searches specified query by word prefixes in the provided strings.
Returns 0-based positions of strings that matched. Can be called synchronously
- public FoundPositions search_strings_by_prefix_sync (ArrayList<string?> strings, string query, int32 limit, bool return_none_for_empty_query) throws TDLibError
Searches specified query by word prefixes in the provided strings.
Returns 0-based positions of strings that matched. Can be called synchronously
- public async User search_user_by_phone_number (string phone_number, bool only_local) throws TDLibError
Searches a user by their phone number. Returns a 404 error if the user
can't be found
- public async User search_user_by_token (string token) throws TDLibError
Searches a user by a token from the user's link
- public async FoundWebApp search_web_app (int64 bot_user_id, string web_app_short_name) throws TDLibError
Returns information about a Web App by its short name. Returns a 404
error if the Web App is not found
- public async Ok sell_gift (string business_connection_id, string received_gift_id) throws TDLibError
Sells a gift for Telegram Stars
- public async Ok send_authentication_firebase_sms (string token) throws TDLibError
Sends Firebase Authentication SMS to the phone number of the user.
Works only when the current authorization state is authorizationStateWaitCode and the server returned code of the type
authenticationCodeTypeFirebaseAndroid or authenticationCodeTypeFirebaseIos
- public async Message send_bot_start_message (int64 bot_user_id, int64 chat_id, string parameter) throws TDLibError
Invites a bot to a chat (if it is not yet a member) and sends it the
/start command; requires can_invite_users member right. Bots can't be invited to a private chat other than the chat with the bot. Bots
can't be invited to channels (although they can be added as admins) and secret chats. Returns the sent message
- public async BusinessMessage send_business_message (string business_connection_id, int64 chat_id, InputMessageReplyTo reply_to, bool disable_notification, bool protect_content, int64 effect_id, ReplyMarkup reply_markup, InputMessageContent input_message_content) throws TDLibError
Sends a message on behalf of a business account; for bots only.
Returns the message after it was sent
- public async BusinessMessages send_business_message_album (string business_connection_id, int64 chat_id, InputMessageReplyTo reply_to, bool disable_notification, bool protect_content, int64 effect_id, ArrayList<InputMessageContent?> input_message_contents) throws TDLibError
Sends 2-10 messages grouped together into an album on behalf of a
business account; for bots only. Currently, only audio, document, photo and video messages can be grouped into an album. Documents and
audio files can be only grouped in an album with messages of the same type. Returns sent messages
- public async Ok send_call_debug_information (int32 call_id, string debug_information) throws TDLibError
Sends debug information for a call to Telegram servers
- public async Ok send_call_log (int32 call_id, InputFile log_file) throws TDLibError
Sends log file for a call to Telegram servers
- public async Ok send_call_rating (int32 call_id, int32 rating, string comment, ArrayList<CallProblem?> problems) throws TDLibError
Sends a call rating
- public async Ok send_call_signaling_data (int32 call_id, Bytes data) throws TDLibError
Sends call signaling data
- public async Ok send_chat_action (int64 chat_id, int64 message_thread_id, string business_connection_id, ChatAction action) throws TDLibError
Sends a notification about user activity in a chat
- public async CustomRequestResult send_custom_request (string method, string parameters) throws TDLibError
Sends a custom request; for bots only
- public async EmailAddressAuthenticationCodeInfo send_email_address_verification_code (string email_address) throws TDLibError
Sends a code to verify an email address to be added to a user's
Telegram Passport
- public async Ok send_gift (int64 gift_id, MessageSender owner_id, FormattedText text, bool is_private, bool pay_for_upgrade) throws TDLibError
Sends a gift to another user or channel chat. May return an error with
a message "STARGIFT_USAGE_LIMITED" if the gift was sold out
- public async Message send_inline_query_result_message (int64 chat_id, int64 message_thread_id, InputMessageReplyTo reply_to, MessageSendOptions options, int64 query_id, string result_id, bool hide_via_bot) throws TDLibError
Sends the result of an inline query as a message. Returns the sent
message. Always clears a chat draft message
- public async Message send_message (int64 chat_id, int64 message_thread_id, InputMessageReplyTo reply_to, MessageSendOptions options, ReplyMarkup reply_markup, InputMessageContent input_message_content) throws TDLibError
Sends a message. Returns the sent message
- public async Messages send_message_album (int64 chat_id, int64 message_thread_id, InputMessageReplyTo reply_to, MessageSendOptions options, ArrayList<InputMessageContent?> input_message_contents) throws TDLibError
Sends 2-10 messages grouped together into an album. Currently, only
audio, document, photo and video messages can be grouped into an album. Documents and audio files can be only grouped in an album with
messages of the same type. Returns sent messages
- public async Ok send_passport_authorization_form (int32 authorization_form_id, ArrayList<PassportElementType?> types) throws TDLibError
- public async PaymentResult send_payment_form (InputInvoice input_invoice, int64 payment_form_id, string order_info_id, string shipping_option_id, InputCredentials credentials, int64 tip_amount) throws TDLibError
Sends a filled-out payment form to the bot for final verification
- public async AuthenticationCodeInfo send_phone_number_code (string phone_number, PhoneNumberAuthenticationSettings settings, PhoneNumberCodeType type_) throws TDLibError
Sends a code to the specified phone number. Aborts previous phone
number verification if there was one. On success, returns information about the sent code
- public async Ok send_phone_number_firebase_sms (string token) throws TDLibError
Sends Firebase Authentication SMS to the specified phone number. Works
only when received a code of the type authenticationCodeTypeFirebaseAndroid or authenticationCodeTypeFirebaseIos
- public async Messages send_quick_reply_shortcut_messages (int64 chat_id, int32 shortcut_id, int32 sending_id) throws TDLibError
Sends messages from a quick reply shortcut. Requires Telegram Business
subscription. Can't be used to send paid messages
- public async Ok send_resold_gift (string gift_name, MessageSender owner_id, int64 star_count) throws TDLibError
Sends an upgraded gift that is available for resale to another user or
channel chat; gifts already owned by the current user must be transferred using
Client.transfer_gift and can't be passed to the method
- public async CustomRequestResult send_web_app_custom_request (int64 bot_user_id, string method, string parameters) throws TDLibError
Sends a custom request from a Web App
- public async Ok send_web_app_data (int64 bot_user_id, string button_text, string data) throws TDLibError
Sends data received from a keyboardButtonTypeWebApp Web App to a bot
- public async Ok set_accent_color (int32 accent_color_id, int64 background_custom_emoji_id) throws TDLibError
Changes accent color and background custom emoji for the current user;
for Telegram Premium users only
- public async Ok set_account_ttl (AccountTtl ttl) throws TDLibError
Changes the period of inactivity after which the account of the
current user will automatically be deleted
- public async Ok set_alarm (double seconds) throws TDLibError
Succeeds after a specified amount of time has passed. Can be called
before initialization
- public async Ok set_application_verification_token (int64 verification_id, string token) throws TDLibError
Application or reCAPTCHA verification has been completed. Can be
called before authorization
- public async Ok set_archive_chat_list_settings (ArchiveChatListSettings settings) throws TDLibError
Changes settings for automatic moving of chats to and from the Archive
chat lists
- public async Ok set_authentication_email_address (string email_address) throws TDLibError
Sets the email address of the user and sends an authentication code to
the email address. Works only when the current authorization state is authorizationStateWaitEmailAddress
- public async Ok set_authentication_phone_number (string phone_number, PhoneNumberAuthenticationSettings settings) throws TDLibError
Sets the phone number of the user and sends an authentication code to
the user. Works only when the current authorization state is authorizationStateWaitPhoneNumber, or if there is no pending
authentication query and the current authorization state is authorizationStateWaitPremiumPurchase, authorizationStateWaitEmailAddress,
authorizationStateWaitEmailCode, authorizationStateWaitCode, authorizationStateWaitRegistration, or authorizationStateWaitPassword
- public async Ok set_authentication_premium_purchase_transaction (StoreTransaction transaction, bool is_restore, string currency, int64 amount) throws TDLibError
Informs server about an in-store purchase of Telegram Premium before
authorization. Works only when the current authorization state is authorizationStateWaitPremiumPurchase
- public async Ok set_auto_download_settings (AutoDownloadSettings settings, NetworkType type_) throws TDLibError
Sets auto-download settings
- public async Ok set_autosave_settings (AutosaveSettingsScope scope, ScopeAutosaveSettings settings) throws TDLibError
- public async Ok set_bio (string bio) throws TDLibError
Changes the bio of the current user
- public async Ok set_birthdate (Birthdate birthdate) throws TDLibError
Changes the birthdate of the current user
- public async Ok set_bot_info_description (int64 bot_user_id, string language_code, string description) throws TDLibError
Sets the text shown in the chat with a bot if the chat is empty. Can
be called only if userTypeBot.can_be_edited == true
- public async Ok set_bot_info_short_description (int64 bot_user_id, string language_code, string short_description) throws TDLibError
Sets the text shown on a bot's profile page and sent together with the
link when users share the bot. Can be called only if userTypeBot.can_be_edited == true
- public async Ok set_bot_name (int64 bot_user_id, string language_code, string name) throws TDLibError
Sets the name of a bot. Can be called only if
userTypeBot.can_be_edited == true
- public async Ok set_bot_profile_photo (int64 bot_user_id, InputChatPhoto photo) throws TDLibError
Changes a profile photo for a bot
- public async Ok set_bot_updates_status (int32 pending_update_count, string error_message) throws TDLibError
Informs the server about the number of pending bot updates if they
haven't been processed for a long time; for bots only
- public async Ok set_business_account_bio (string business_connection_id, string bio) throws TDLibError
Changes the bio of a business account; for bots only
- public async Ok set_business_account_gift_settings (string business_connection_id, GiftSettings settings) throws TDLibError
Changes settings for gift receiving of a business account; for bots
only
- public async Ok set_business_account_name (string business_connection_id, string first_name, string last_name) throws TDLibError
Changes the first and last name of a business account; for bots only
- public async Ok set_business_account_profile_photo (string business_connection_id, InputChatPhoto photo, bool is_public) throws TDLibError
Changes a profile photo of a business account; for bots only
- public async Ok set_business_account_username (string business_connection_id, string username) throws TDLibError
Changes the editable username of a business account; for bots only
- public async Ok set_business_away_message_settings (BusinessAwayMessageSettings away_message_settings) throws TDLibError
Changes the business away message settings of the current user.
Requires Telegram Business subscription
- public async Ok set_business_connected_bot (BusinessConnectedBot bot) throws TDLibError
Adds or changes business bot that is connected to the current user
account
- public async Ok set_business_greeting_message_settings (BusinessGreetingMessageSettings greeting_message_settings) throws TDLibError
Changes the business greeting message settings of the current user.
Requires Telegram Business subscription
- public async Ok set_business_location (BusinessLocation location) throws TDLibError
Changes the business location of the current user. Requires Telegram
Business subscription
- public async Ok set_business_message_is_pinned (string business_connection_id, int64 chat_id, int64 message_id, bool is_pinned) throws TDLibError
Pins or unpins a message sent on behalf of a business account; for
bots only
- public async Ok set_business_opening_hours (BusinessOpeningHours opening_hours) throws TDLibError
Changes the business opening hours of the current user. Requires
Telegram Business subscription
- public async Ok set_business_start_page (InputBusinessStartPage start_page) throws TDLibError
Changes the business start page of the current user. Requires Telegram
Business subscription
- public async Ok set_chat_accent_color (int64 chat_id, int32 accent_color_id, int64 background_custom_emoji_id) throws TDLibError
Changes accent color and background custom emoji of a channel chat.
Requires can_change_info administrator right
- public async Ok set_chat_active_stories_list (int64 chat_id, StoryList story_list) throws TDLibError
Changes story list in which stories from the chat are shown
- public async Ok set_chat_affiliate_program (int64 chat_id, AffiliateProgramParameters parameters) throws TDLibError
Changes affiliate program for a bot
- public async Ok set_chat_available_reactions (int64 chat_id, ChatAvailableReactions available_reactions) throws TDLibError
Changes reactions, available in a chat. Available for basic groups,
supergroups, and channels. Requires can_change_info member right
- public async Ok set_chat_background (int64 chat_id, InputBackground background, BackgroundType type_, int32 dark_theme_dimming, bool only_for_self) throws TDLibError
Sets the background in a specific chat. Supported only in private and
secret chats with non-deleted users, and in chats with sufficient boost level and can_change_info administrator right
- public async Ok set_chat_client_data (int64 chat_id, string client_data) throws TDLibError
Changes application-specific data associated with a chat
- public async Ok set_chat_description (int64 chat_id, string description) throws TDLibError
Changes information about a chat. Available for basic groups,
supergroups, and channels. Requires can_change_info member right
- public async Ok set_chat_discussion_group (int64 chat_id, int64 discussion_chat_id) throws TDLibError
Changes the discussion group of a channel chat; requires
can_change_info administrator right in the channel if it is specified
- public async Ok set_chat_draft_message (int64 chat_id, int64 message_thread_id, DraftMessage draft_message) throws TDLibError
Changes the draft message in a chat
- public async Ok set_chat_emoji_status (int64 chat_id, EmojiStatus emoji_status) throws TDLibError
Changes the emoji status of a chat. Use
chatBoostLevelFeatures.can_set_emoji_status to check whether an emoji status can be set. Requires can_change_info administrator right
- public async Ok set_chat_location (int64 chat_id, ChatLocation location) throws TDLibError
Changes the location of a chat. Available only for some location-based
supergroups, use supergroupFullInfo.can_set_location to check whether the method is allowed to use
- public async Ok set_chat_member_status (int64 chat_id, MessageSender member_id, ChatMemberStatus status) throws TDLibError
Changes the status of a chat member; requires can_invite_users member
right to add a chat member, can_promote_members administrator right to change administrator rights of the member, and
can_restrict_members administrator right to change restrictions of a user. This function is currently not suitable for transferring
chat ownership; use Client.transfer_chat_ownership instead. Use
Client.add_chat_member or
Client.ban_chat_member if some additional parameters needs to be passed
- public async Ok set_chat_message_auto_delete_time (int64 chat_id, int32 message_auto_delete_time) throws TDLibError
Changes the message auto-delete or self-destruct (for secret chats)
time in a chat. Requires change_info administrator right in basic groups, supergroups and channels. Message auto-delete time can't be
changed in a chat with the current user (Saved Messages) and the chat 777000 (Telegram).
- public async Ok set_chat_message_sender (int64 chat_id, MessageSender message_sender_id) throws TDLibError
Selects a message sender to send messages in a chat
- public async Ok set_chat_notification_settings (int64 chat_id, ChatNotificationSettings notification_settings) throws TDLibError
Changes the notification settings of a chat. Notification settings of
a chat with the current user (Saved Messages) can't be changed
- public async Ok set_chat_paid_message_star_count (int64 chat_id, int64 paid_message_star_count) throws TDLibError
Changes the amount of Telegram Stars that must be paid to send a
message to a supergroup chat; requires can_restrict_members administrator right and supergroupFullInfo.can_enable_paid_messages
- public async Ok set_chat_permissions (int64 chat_id, ChatPermissions permissions) throws TDLibError
Changes the chat members permissions. Supported only for basic groups
and supergroups. Requires can_restrict_members administrator right
- public async Ok set_chat_photo (int64 chat_id, InputChatPhoto photo) throws TDLibError
Changes the photo of a chat. Supported only for basic groups,
supergroups and channels. Requires can_change_info member right
- public async Ok set_chat_pinned_stories (int64 chat_id, ArrayList<int32?> story_ids) throws TDLibError
Changes the list of pinned stories on a chat page; requires
can_edit_stories right in the chat
- public async Ok set_chat_profile_accent_color (int64 chat_id, int32 profile_accent_color_id, int64 profile_background_custom_emoji_id) throws TDLibError
Changes accent color and background custom emoji for profile of a
supergroup or channel chat. Requires can_change_info administrator right
- public async Ok set_chat_slow_mode_delay (int64 chat_id, int32 slow_mode_delay) throws TDLibError
Changes the slow mode delay of a chat. Available only for supergroups;
requires can_restrict_members right
- public async Ok set_chat_theme (int64 chat_id, string theme_name) throws TDLibError
Changes the chat theme. Supported only in private and secret chats
- public async Ok set_chat_title (int64 chat_id, string title) throws TDLibError
Changes the chat title. Supported only for basic groups, supergroups
and channels. Requires can_change_info member right
- public async Ok set_close_friends (ArrayList<int64?> user_ids) throws TDLibError
Changes the list of
Client.close friends of the current user
- public async Ok set_commands (BotCommandScope scope, string language_code, ArrayList<BotCommand?> commands) throws TDLibError
Sets the list of commands supported by the bot for the given user
scope and language; for bots only
- public async Ok set_custom_emoji_sticker_set_thumbnail (string name, int64 custom_emoji_id) throws TDLibError
Sets a custom emoji sticker set thumbnail
- public async Ok set_custom_language_pack (LanguagePackInfo info, ArrayList<LanguagePackString?> strings) throws TDLibError
Adds or changes a custom local language pack to the current
localization target
- public async Ok set_custom_language_pack_string (string language_pack_id, LanguagePackString new_string) throws TDLibError
Adds, edits or deletes a string in a custom local language pack. Can
be called before authorization
- public async Ok set_database_encryption_key (Bytes new_encryption_key) throws TDLibError
Changes the database encryption key. Usually the encryption key is
never changed and is stored in some OS keychain
- public async Background set_default_background (InputBackground background, BackgroundType type_, bool for_dark_theme) throws TDLibError
Sets default background for chats; adds the background to the list of
installed backgrounds
- public async Ok set_default_channel_administrator_rights (ChatAdministratorRights default_channel_administrator_rights) throws TDLibError
Sets default administrator rights for adding the bot to channel chats;
for bots only
- public async Ok set_default_group_administrator_rights (ChatAdministratorRights default_group_administrator_rights) throws TDLibError
Sets default administrator rights for adding the bot to basic group
and supergroup chats; for bots only
- public async Ok set_default_message_auto_delete_time (MessageAutoDeleteTime message_auto_delete_time) throws TDLibError
Changes the default message auto-delete time for new chats
- public async Ok set_default_reaction_type (ReactionType reaction_type) throws TDLibError
Changes type of default reaction for the current user
- public async Ok set_emoji_status (EmojiStatus emoji_status) throws TDLibError
Changes the emoji status of the current user; for Telegram Premium
users only
- public async Ok set_file_generation_progress (int64 generation_id, int64 expected_size, int64 local_prefix_size) throws TDLibError
Informs TDLib on a file generation progress
- public async Ok set_forum_topic_notification_settings (int64 chat_id, int64 message_thread_id, ChatNotificationSettings notification_settings) throws TDLibError
Changes the notification settings of a forum topic
- public async Message set_game_score (int64 chat_id, int64 message_id, bool edit_message, int64 user_id, int32 score, bool force) throws TDLibError
Updates the game score of the specified user in the game; for bots
only
- public async Ok set_gift_resale_price (string received_gift_id, int64 resale_star_count) throws TDLibError
Changes resale price of a unique gift owned by the current user
- public async Ok set_gift_settings (GiftSettings settings) throws TDLibError
Changes settings for gift receiving for the current user
- public async Ok set_group_call_participant_is_speaking (int32 group_call_id, int32 audio_source, bool is_speaking) throws TDLibError
Informs TDLib that speaking state of a participant of an active group
call has changed
- public async Ok set_group_call_participant_volume_level (int32 group_call_id, MessageSender participant_id, int32 volume_level) throws TDLibError
Changes volume level of a participant of an active group call. If the
current user can manage the group call or is the owner of the group call, then the participant's volume level will be changed for all
users with the default volume level
- public async Ok set_inactive_session_ttl (int32 inactive_session_ttl_days) throws TDLibError
Changes the period of inactivity after which sessions will
automatically be terminated
- public async Ok set_inline_game_score (string inline_message_id, bool edit_message, int64 user_id, int32 score, bool force) throws TDLibError
Updates the game score of the specified user in a game; for bots only
- public async Ok set_log_stream (LogStream log_stream) throws TDLibError
Sets new log stream for internal logging of TDLib. Can be called
synchronously
- public Ok set_log_stream_sync (LogStream log_stream) throws TDLibError
Sets new log stream for internal logging of TDLib. Can be called
synchronously
- public async Ok set_log_tag_verbosity_level (string tag, int32 new_verbosity_level) throws TDLibError
Sets the verbosity level for a specified TDLib internal log tag. Can
be called synchronously
- public Ok set_log_tag_verbosity_level_sync (string tag, int32 new_verbosity_level) throws TDLibError
Sets the verbosity level for a specified TDLib internal log tag. Can
be called synchronously
- public async Ok set_log_verbosity_level (int32 new_verbosity_level) throws TDLibError
Sets the verbosity level of the internal logging of TDLib. Can be
called synchronously
- public Ok set_log_verbosity_level_sync (int32 new_verbosity_level) throws TDLibError
Sets the verbosity level of the internal logging of TDLib. Can be
called synchronously
- public async EmailAddressAuthenticationCodeInfo set_login_email_address (string new_login_email_address) throws TDLibError
Changes the login email address of the user. The email address can be
changed only if the current user already has login email and passwordState.login_email_address_pattern is non-empty. The change will
not be applied until the new login email address is confirmed with
Client.check_login_email_address_code To use Apple
ID/Google ID instead of an email address, call
Client.check_login_email_address_code directly
- public async Ok set_menu_button (int64 user_id, BotMenuButton menu_button) throws TDLibError
Sets menu button for the given user or for all users; for bots only
- public async Ok set_message_fact_check (int64 chat_id, int64 message_id, FormattedText text) throws TDLibError
Changes the fact-check of a message. Can be only used if
messageProperties.can_set_fact_check == true
- public async Ok set_message_reactions (int64 chat_id, int64 message_id, ArrayList<ReactionType?> reaction_types, bool is_big) throws TDLibError
Sets reactions on a message; for bots only
- public async Ok set_message_sender_block_list (MessageSender sender_id, BlockList block_list) throws TDLibError
Changes the block list of a message sender. Currently, only users and
supergroup chats can be blocked
- public async Ok set_message_sender_bot_verification (int64 bot_user_id, MessageSender verified_id, string custom_description) throws TDLibError
Changes the verification status of a user or a chat by an owned bot
- public async Ok set_name (string first_name, string last_name) throws TDLibError
Changes the first and last name of the current user
- public async Ok set_network_type (NetworkType type_) throws TDLibError
Sets the current network type. Can be called before authorization.
Calling this method forces all network connections to reopen, mitigating the delay in switching between different networks, so it must
be called whenever the network is changed, even if the network type remains the same. Network type is used to check whether the
library can use the network at all and also for collecting detailed network data usage statistics
- public async Ok set_new_chat_privacy_settings (NewChatPrivacySettings settings) throws TDLibError
Changes privacy settings for new chat creation; can be used only if
getOption("can_set_new_chat_privacy_settings")
- public async Ok set_option (string name, OptionValue value) throws TDLibError
- public async Ok set_paid_message_reaction_type (int64 chat_id, int64 message_id, PaidReactionType type_) throws TDLibError
Changes type of paid message reaction of the current user on a
message. The message must have paid reaction added by the current user
- public async PassportElement set_passport_element (InputPassportElement element, string password) throws TDLibError
Adds an element to the user's Telegram Passport. May return an error
with a message "PHONE_VERIFICATION_NEEDED" or "EMAIL_VERIFICATION_NEEDED" if the chosen phone number or the chosen email address must
be verified first
- public async Ok set_passport_element_errors (int64 user_id, ArrayList<InputPassportElementError?> errors) throws TDLibError
Informs the user that some of the elements in their Telegram Passport
contain errors; for bots only. The user will not be able to resend the elements, until the errors are fixed
- public async PasswordState set_password (string old_password, string new_password, string new_hint, bool set_recovery_email_address, string new_recovery_email_address) throws TDLibError
Changes the 2-step verification password for the current user. If a
new recovery email address is specified, then the change will not be applied until the new recovery email address is confirmed
- public async Ok set_personal_chat (int64 chat_id) throws TDLibError
Changes the personal chat of the current user
- public async Ok set_pinned_chats (ChatList chat_list, ArrayList<int64?> chat_ids) throws TDLibError
Changes the order of pinned chats
- public async Ok set_pinned_forum_topics (int64 chat_id, ArrayList<int64?> message_thread_ids) throws TDLibError
Changes the order of pinned forum topics; requires can_manage_topics
right in the supergroup
- public async Ok set_pinned_gifts (MessageSender owner_id, ArrayList<string?> received_gift_ids) throws TDLibError
Changes the list of pinned gifts on the current user's or the
channel's profile page; requires can_post_messages administrator right in the channel chat
- public async Ok set_pinned_saved_messages_topics (ArrayList<int64?> saved_messages_topic_ids) throws TDLibError
Changes the order of pinned Saved Messages topics
- public async Ok set_poll_answer (int64 chat_id, int64 message_id, ArrayList<int32?> option_ids) throws TDLibError
Changes the user answer to a poll. A poll in quiz mode can be answered
only once
- public async Ok set_profile_accent_color (int32 profile_accent_color_id, int64 profile_background_custom_emoji_id) throws TDLibError
Changes accent color and background custom emoji for profile of the
current user; for Telegram Premium users only
- public async Ok set_profile_photo (InputChatPhoto photo, bool is_public) throws TDLibError
Changes a profile photo for the current user
- public async Ok set_quick_reply_shortcut_name (int32 shortcut_id, string name) throws TDLibError
Changes name of a quick reply shortcut
- public async Ok set_reaction_notification_settings (ReactionNotificationSettings notification_settings) throws TDLibError
Changes notification settings for reactions
- public async Ok set_read_date_privacy_settings (ReadDatePrivacySettings settings) throws TDLibError
Changes privacy settings for message read date
- public async PasswordState set_recovery_email_address (string password, string new_recovery_email_address) throws TDLibError
Changes the 2-step verification recovery email address of the user. If
a new recovery email address is specified, then the change will not be applied until the new recovery email address is confirmed. If
new_recovery_email_address is the same as the email address that is currently set up, this call succeeds immediately and aborts all
other requests waiting for an email confirmation
- public async Ok set_saved_messages_tag_label (ReactionType tag, string label) throws TDLibError
Changes label of a Saved Messages tag; for Telegram Premium users only
- public async Ok set_scope_notification_settings (NotificationSettingsScope scope, ScopeNotificationSettings notification_settings) throws TDLibError
Changes notification settings for chats of a given type
- public async Ok set_sticker_emojis (InputFile sticker, string emojis) throws TDLibError
Changes the list of emojis corresponding to a sticker. The sticker
must belong to a regular or custom emoji sticker set that is owned by the current user
- public async Ok set_sticker_keywords (InputFile sticker, ArrayList<string?> keywords) throws TDLibError
Changes the list of keywords of a sticker. The sticker must belong to
a regular or custom emoji sticker set that is owned by the current user
- public async Ok set_sticker_mask_position (InputFile sticker, MaskPosition mask_position) throws TDLibError
Changes the mask position of a mask sticker. The sticker must belong
to a mask sticker set that is owned by the current user
- public async Ok set_sticker_position_in_set (InputFile sticker, int32 position) throws TDLibError
Changes the position of a sticker in the set to which it belongs. The
sticker set must be owned by the current user
- public async Ok set_sticker_set_thumbnail (int64 user_id, string name, InputFile thumbnail, StickerFormat format) throws TDLibError
Sets a sticker set thumbnail
- public async Ok set_sticker_set_title (string name, string title) throws TDLibError
Sets a sticker set title
- public async Ok set_story_privacy_settings (int32 story_id, StoryPrivacySettings privacy_settings) throws TDLibError
Changes privacy settings of a story. The method can be called only for
stories posted on behalf of the current user and if story.can_be_edited == true
- public async Ok set_story_reaction (int64 story_poster_chat_id, int32 story_id, ReactionType reaction_type, bool update_recent_reactions) throws TDLibError
Changes chosen reaction on a story that has already been sent
- public async Ok set_supergroup_custom_emoji_sticker_set (int64 supergroup_id, int64 custom_emoji_sticker_set_id) throws TDLibError
Changes the custom emoji sticker set of a supergroup; requires
can_change_info administrator right. The chat must have at least chatBoostFeatures.min_custom_emoji_sticker_set_boost_level boost
level to pass the corresponding color
- public async Ok set_supergroup_sticker_set (int64 supergroup_id, int64 sticker_set_id) throws TDLibError
Changes the sticker set of a supergroup; requires can_change_info
administrator right
- public async Ok set_supergroup_unrestrict_boost_count (int64 supergroup_id, int32 unrestrict_boost_count) throws TDLibError
Changes the number of times the supergroup must be boosted by a user
to ignore slow mode and chat permission restrictions; requires can_restrict_members administrator right
- public async Ok set_supergroup_username (int64 supergroup_id, string username) throws TDLibError
Changes the editable username of a supergroup or channel, requires
owner privileges in the supergroup or channel
- public async Ok set_tdlib_parameters (bool use_test_dc, string database_directory, string files_directory, Bytes database_encryption_key, bool use_file_database, bool use_chat_info_database, bool use_message_database, bool use_secret_chats, int32 api_id, string api_hash, string system_language_code, string device_model, string system_version, string application_version) throws TDLibError
Sets the parameters for TDLib initialization. Works only when the
current authorization state is authorizationStateWaitTdlibParameters
- public async Ok set_user_emoji_status (int64 user_id, EmojiStatus emoji_status) throws TDLibError
Changes the emoji status of a user; for bots only
- public async Ok set_user_personal_profile_photo (int64 user_id, InputChatPhoto photo) throws TDLibError
Changes a personal profile photo of a contact user
- public async Ok set_user_privacy_setting_rules (UserPrivacySetting setting, UserPrivacySettingRules rules) throws TDLibError
Changes user privacy settings
- public async UserSupportInfo set_user_support_info (int64 user_id, FormattedText message) throws TDLibError
Sets support information for the given user; for Telegram support only
- public async Ok set_username (string username) throws TDLibError
Changes the editable username of the current user
- public async Ok set_video_chat_default_participant (int64 chat_id, MessageSender default_participant_id) throws TDLibError
Changes default participant identifier, on whose behalf a video chat
in the chat will be joined
- public async Ok set_video_chat_title (int32 group_call_id, string title) throws TDLibError
Sets title of a video chat; requires groupCall.can_be_managed right
- public async Ok share_chat_with_bot (int64 chat_id, int64 message_id, int32 button_id, int64 shared_chat_id, bool only_check) throws TDLibError
Shares a chat after pressing a keyboardButtonTypeRequestChat button
with the bot
- public async Ok share_phone_number (int64 user_id) throws TDLibError
Shares the phone number of the current user with a mutual contact.
Supposed to be called when the user clicks on chatActionBarSharePhoneNumber
- public async Ok share_users_with_bot (int64 chat_id, int64 message_id, int32 button_id, ArrayList<int64?> shared_user_ids, bool only_check) throws TDLibError
Shares users after pressing a keyboardButtonTypeRequestUsers button
with the bot
- public async Ok start_group_call_recording (int32 group_call_id, string title, bool record_video, bool use_portrait_orientation) throws TDLibError
Starts recording of an active group call; for video chats only.
Requires groupCall.can_be_managed right
- public async Text start_group_call_screen_sharing (int32 group_call_id, int32 audio_source_id, string payload) throws TDLibError
Starts screen sharing in a joined group call. Returns join response
payload for tgcalls
- public async Ok start_scheduled_video_chat (int32 group_call_id) throws TDLibError
Starts a scheduled video chat
- public async BusinessMessage stop_business_poll (string business_connection_id, int64 chat_id, int64 message_id, ReplyMarkup reply_markup) throws TDLibError
Stops a poll sent on behalf of a business account; for bots only
- public async Ok stop_poll (int64 chat_id, int64 message_id, ReplyMarkup reply_markup) throws TDLibError
Stops a poll
- public async Ok suggest_user_profile_photo (int64 user_id, InputChatPhoto photo) throws TDLibError
Suggests a profile photo to another regular user with common messages
and allowing non-paid messages
- public async Ok synchronize_language_pack (string language_pack_id) throws TDLibError
Fetches the latest versions of all strings from a language pack in the
current localization target from the server. This method doesn't need to be called explicitly for the current used/base language
packs. Can be called before authorization
- public async Ok terminate_all_other_sessions () throws TDLibError
Terminates all other sessions of the current user
- public async Ok terminate_session (int64 session_id) throws TDLibError
Terminates a session of the current user
- public async TestBytes test_call_bytes (Bytes x) throws TDLibError
Returns the received bytes; for testing only. This is an offline
method. Can be called before authorization
- public async Ok test_call_empty () throws TDLibError
Does nothing; for testing only. This is an offline method. Can be
called before authorization
- public async TestString test_call_string (string x) throws TDLibError
Returns the received string; for testing only. This is an offline
method. Can be called before authorization
- public async TestVectorInt test_call_vector_int (ArrayList<int32?> x) throws TDLibError
Returns the received vector of numbers; for testing only. This is an
offline method. Can be called before authorization
- public async TestVectorIntObject test_call_vector_int_object (ArrayList<TestInt?> x) throws TDLibError
Returns the received vector of objects containing a number; for
testing only. This is an offline method. Can be called before authorization
- public async TestVectorString test_call_vector_string (ArrayList<string?> x) throws TDLibError
Returns the received vector of strings; for testing only. This is an
offline method. Can be called before authorization
- public async TestVectorStringObject test_call_vector_string_object (ArrayList<TestString?> x) throws TDLibError
Returns the received vector of objects containing a string; for
testing only. This is an offline method. Can be called before authorization
- public async Ok test_get_difference () throws TDLibError
Forces an updates.getDifference call to the Telegram servers; for
testing only
- public async Ok test_network () throws TDLibError
Sends a simple network request to the Telegram servers; for testing
only. Can be called before authorization
- public async Ok test_proxy (string server, int32 port, ProxyType type_, int32 dc_id, double timeout) throws TDLibError
Sends a simple network request to the Telegram servers via proxy; for
testing only. Can be called before authorization
- public async Error test_return_error (Error error) throws TDLibError
Returns the specified error and ensures that the Error object is used;
for testing only. Can be called synchronously
- public Error test_return_error_sync (Error error) throws TDLibError
Returns the specified error and ensures that the Error object is used;
for testing only. Can be called synchronously
- public async TestInt test_square_int (int32 x) throws TDLibError
Returns the squared received number; for testing only. This is an
offline method. Can be called before authorization
- public async Update test_use_update () throws TDLibError
Does nothing and ensures that the Update object is used; for testing
only. This is an offline method. Can be called before authorization
- public async Ok toggle_all_downloads_are_paused (bool are_paused) throws TDLibError
Changes pause state of all files in the file download list
- public async Ok toggle_bot_can_manage_emoji_status (int64 bot_user_id, bool can_manage_emoji_status) throws TDLibError
Toggles whether the bot can manage emoji status of the current user
- public async Ok toggle_bot_is_added_to_attachment_menu (int64 bot_user_id, bool is_added, bool allow_write_access) throws TDLibError
Adds or removes a bot to attachment and side menu. Bot can be added to
the menu, only if userTypeBot.can_be_added_to_attachment_menu == true
- public async Ok toggle_bot_username_is_active (int64 bot_user_id, string username, bool is_active) throws TDLibError
Changes active state for a username of a bot. The editable username
can't be disabled. May return an error with a message "USERNAMES_ACTIVE_TOO_MUCH" if the maximum number of active usernames has been
reached. Can be called only if userTypeBot.can_be_edited == true
- public async Ok toggle_business_connected_bot_chat_is_paused (int64 chat_id, bool is_paused) throws TDLibError
Pauses or resumes the connected business bot in a specific chat
- public async Ok toggle_chat_default_disable_notification (int64 chat_id, bool default_disable_notification) throws TDLibError
Changes the value of the default disable_notification parameter, used
when a message is sent to a chat
- public async Ok toggle_chat_folder_tags (bool are_tags_enabled) throws TDLibError
Toggles whether chat folder tags are enabled
- public async Ok toggle_chat_gift_notifications (int64 chat_id, bool are_enabled) throws TDLibError
Toggles whether notifications for new gifts received by a channel chat
are sent to the current user; requires can_post_messages administrator right in the chat
- public async Ok toggle_chat_has_protected_content (int64 chat_id, bool has_protected_content) throws TDLibError
Changes the ability of users to save, forward, or copy chat content.
Supported only for basic groups, supergroups and channels. Requires owner privileges
- public async Ok toggle_chat_is_marked_as_unread (int64 chat_id, bool is_marked_as_unread) throws TDLibError
Changes the marked as unread state of a chat
- public async Ok toggle_chat_is_pinned (ChatList chat_list, int64 chat_id, bool is_pinned) throws TDLibError
Changes the pinned state of a chat. There can be up to
getOption("pinned_chat_count_max")/getOption("pinned_archived_chat_count_max") pinned non-secret chats and the same number of secret
chats in the main/archive chat list. The limit can be increased with Telegram Premium
- public async Ok toggle_chat_is_translatable (int64 chat_id, bool is_translatable) throws TDLibError
Changes the translatable state of a chat
- public async Ok toggle_chat_view_as_topics (int64 chat_id, bool view_as_topics) throws TDLibError
Changes the view_as_topics setting of a forum chat or Saved Messages
- public async Ok toggle_download_is_paused (int32 file_id, bool is_paused) throws TDLibError
Changes pause state of a file in the file download list
- public async Ok toggle_forum_topic_is_closed (int64 chat_id, int64 message_thread_id, bool is_closed) throws TDLibError
Toggles whether a topic is closed in a forum supergroup chat; requires
can_manage_topics right in the supergroup unless the user is creator of the topic
- public async Ok toggle_forum_topic_is_pinned (int64 chat_id, int64 message_thread_id, bool is_pinned) throws TDLibError
Changes the pinned state of a forum topic; requires can_manage_topics
right in the supergroup. There can be up to getOption("pinned_forum_topic_count_max") pinned forum topics
- public async Ok toggle_general_forum_topic_is_hidden (int64 chat_id, bool is_hidden) throws TDLibError
Toggles whether a General topic is hidden in a forum supergroup chat;
requires can_manage_topics right in the supergroup
- public async Ok toggle_gift_is_saved (string received_gift_id, bool is_saved) throws TDLibError
Toggles whether a gift is shown on the current user's or the channel's
profile page; requires can_post_messages administrator right in the channel chat
- public async Ok toggle_group_call_is_my_video_enabled (int32 group_call_id, bool is_my_video_enabled) throws TDLibError
Toggles whether current user's video is enabled
- public async Ok toggle_group_call_is_my_video_paused (int32 group_call_id, bool is_my_video_paused) throws TDLibError
Toggles whether current user's video is paused
- public async Ok toggle_group_call_participant_is_hand_raised (int32 group_call_id, MessageSender participant_id, bool is_hand_raised) throws TDLibError
Toggles whether a group call participant hand is rased; for video
chats only
- public async Ok toggle_group_call_participant_is_muted (int32 group_call_id, MessageSender participant_id, bool is_muted) throws TDLibError
Toggles whether a participant of an active group call is muted,
unmuted, or allowed to unmute themselves
- public async Ok toggle_group_call_screen_sharing_is_paused (int32 group_call_id, bool is_paused) throws TDLibError
Pauses or unpauses screen sharing in a joined group call
- public async Ok toggle_has_sponsored_messages_enabled (bool has_sponsored_messages_enabled) throws TDLibError
Toggles whether the current user has sponsored messages enabled. The
setting has no effect for users without Telegram Premium for which sponsored messages are always enabled
- public async Ok toggle_saved_messages_topic_is_pinned (int64 saved_messages_topic_id, bool is_pinned) throws TDLibError
Changes the pinned state of a Saved Messages topic. There can be up to
getOption("pinned_saved_messages_topic_count_max") pinned topics. The limit can be increased with Telegram Premium
- public async Ok toggle_session_can_accept_calls (int64 session_id, bool can_accept_calls) throws TDLibError
Toggles whether a session can accept incoming calls
- public async Ok toggle_session_can_accept_secret_chats (int64 session_id, bool can_accept_secret_chats) throws TDLibError
Toggles whether a session can accept incoming secret chats
- public async Ok toggle_story_is_posted_to_chat_page (int64 story_poster_chat_id, int32 story_id, bool is_posted_to_chat_page) throws TDLibError
Toggles whether a story is accessible after expiration. Can be called
only if story.can_toggle_is_posted_to_chat_page == true
- public async Ok toggle_supergroup_can_have_sponsored_messages (int64 supergroup_id, bool can_have_sponsored_messages) throws TDLibError
Toggles whether sponsored messages are shown in the channel chat;
requires owner privileges in the channel. The chat must have at least chatBoostFeatures.min_sponsored_message_disable_boost_level
boost level to disable sponsored messages
- public async Ok toggle_supergroup_has_aggressive_anti_spam_enabled (int64 supergroup_id, bool has_aggressive_anti_spam_enabled) throws TDLibError
Toggles whether aggressive anti-spam checks are enabled in the
supergroup. Can be called only if supergroupFullInfo.can_toggle_aggressive_anti_spam == true
- public async Ok toggle_supergroup_has_automatic_translation (int64 supergroup_id, bool has_automatic_translation) throws TDLibError
Toggles whether messages are automatically translated in the channel
chat; requires can_change_info administrator right in the channel. The chat must have at least
chatBoostFeatures.min_automatic_translation_boost_level boost level to enable automatic translation
- public async Ok toggle_supergroup_has_hidden_members (int64 supergroup_id, bool has_hidden_members) throws TDLibError
- public async Ok toggle_supergroup_is_all_history_available (int64 supergroup_id, bool is_all_history_available) throws TDLibError
Toggles whether the message history of a supergroup is available to
new members; requires can_change_info member right
- public async Ok toggle_supergroup_is_broadcast_group (int64 supergroup_id) throws TDLibError
Upgrades supergroup to a broadcast group; requires owner privileges in
the supergroup
- public async Ok toggle_supergroup_is_forum (int64 supergroup_id, bool is_forum) throws TDLibError
Toggles whether the supergroup is a forum; requires owner privileges
in the supergroup. Discussion supergroups can't be converted to forums
- public async Ok toggle_supergroup_join_by_request (int64 supergroup_id, bool join_by_request) throws TDLibError
Toggles whether all users directly joining the supergroup need to be
approved by supergroup administrators; requires can_restrict_members administrator right
- public async Ok toggle_supergroup_join_to_send_messages (int64 supergroup_id, bool join_to_send_messages) throws TDLibError
Toggles whether joining is mandatory to send messages to a discussion
supergroup; requires can_restrict_members administrator right
- public async Ok toggle_supergroup_sign_messages (int64 supergroup_id, bool sign_messages, bool show_message_sender) throws TDLibError
Toggles whether sender signature or link to the account is added to
sent messages in a channel; requires can_change_info member right
- public async Ok toggle_supergroup_username_is_active (int64 supergroup_id, string username, bool is_active) throws TDLibError
Changes active state for a username of a supergroup or channel,
requires owner privileges in the supergroup or channel. The editable username can't be disabled. May return an error with a message
"USERNAMES_ACTIVE_TOO_MUCH" if the maximum number of active usernames has been reached
- public async Ok toggle_username_is_active (string username, bool is_active) throws TDLibError
Changes active state for a username of the current user. The editable
username can't be disabled. May return an error with a message "USERNAMES_ACTIVE_TOO_MUCH" if the maximum number of active usernames
has been reached
- public async Ok toggle_video_chat_enabled_start_notification (int32 group_call_id, bool enabled_start_notification) throws TDLibError
Toggles whether the current user will receive a notification when the
video chat starts; for scheduled video chats only
- public async Ok toggle_video_chat_mute_new_participants (int32 group_call_id, bool mute_new_participants) throws TDLibError
Toggles whether new participants of a video chat can be unmuted only
by administrators of the video chat. Requires groupCall.can_toggle_mute_new_participants right
- public async Ok transfer_business_account_stars (string business_connection_id, int64 star_count) throws TDLibError
Transfer Telegram Stars from the business account to the business bot;
for bots only
- public async Ok transfer_chat_ownership (int64 chat_id, int64 user_id, string password) throws TDLibError
Changes the owner of a chat; requires owner privileges in the chat.
Use the method Client.can_transfer_ownership to check whether
the ownership can be transferred from the current session. Available only for supergroups and channel chats
- public async Ok transfer_gift (string business_connection_id, string received_gift_id, MessageSender new_owner_id, int64 star_count) throws TDLibError
Sends an upgraded gift to another user or a channel chat
- public async FormattedText translate_message_text (int64 chat_id, int64 message_id, string to_language_code) throws TDLibError
Extracts text or caption of the given message and translates it to the
given language. If the current user is a Telegram Premium user, then text formatting is preserved
- public async FormattedText translate_text (FormattedText text, string to_language_code) throws TDLibError
Translates a text to the given language. If the current user is a
Telegram Premium user, then text formatting is preserved
- public async Ok unpin_all_chat_messages (int64 chat_id) throws TDLibError
Removes all pinned messages from a chat; requires can_pin_messages
member right if the chat is a basic group or supergroup, or can_edit_messages administrator right if the chat is a channel
- public async Ok unpin_all_message_thread_messages (int64 chat_id, int64 message_thread_id) throws TDLibError
Removes all pinned messages from a forum topic; requires
can_pin_messages member right in the supergroup
- public async Ok unpin_chat_message (int64 chat_id, int64 message_id) throws TDLibError
Removes a pinned message from a chat; requires can_pin_messages member
right if the chat is a basic group or supergroup, or can_edit_messages administrator right if the chat is a channel
- public async Chat upgrade_basic_group_chat_to_supergroup_chat (int64 chat_id) throws TDLibError
Creates a new supergroup from an existing basic group and sends a
corresponding messageChatUpgradeTo and messageChatUpgradeFrom; requires owner privileges. Deactivates the original basic group
- public async UpgradeGiftResult upgrade_gift (string business_connection_id, string received_gift_id, bool keep_original_details, int64 star_count) throws TDLibError
Upgrades a regular gift
- public async File upload_sticker_file (int64 user_id, StickerFormat sticker_format, InputFile sticker) throws TDLibError
Uploads a file with a sticker; returns the uploaded file
- public async ValidatedOrderInfo validate_order_info (InputInvoice input_invoice, OrderInfo order_info, bool allow_save) throws TDLibError
Validates the order information provided by a user and returns the
available shipping options for a flexible invoice
- public async Ok view_messages (int64 chat_id, ArrayList<int64?> message_ids, MessageSource source, bool force_read) throws TDLibError
Informs TDLib that messages are being viewed by the user. Sponsored
messages must be marked as viewed only when the entire text of the message is shown on the screen (excluding the button). Many useful
activities depend on whether the messages are currently being viewed or not (e.g., marking messages as read, incrementing a view
counter, updating a view counter, removing deleted messages in supergroups and channels)
- public async Ok view_premium_feature (PremiumFeature feature) throws TDLibError
Informs TDLib that the user viewed detailed information about a
Premium feature on the Premium features screen
- public async Ok view_sponsored_chat (int64 sponsored_chat_unique_id) throws TDLibError
Informs TDLib that the user fully viewed a sponsored chat
- public async Ok view_trending_sticker_sets (ArrayList<int64?> sticker_set_ids) throws TDLibError
Informs the server that some trending sticker sets have been viewed by
the user
- public async Ok write_generated_file_part (int64 generation_id, int64 offset, Bytes data) throws TDLibError
Writes a part of a generated file. This method is intended to be used
only if the application has no direct access to TDLib's file system, because it is usually slower than a direct write to the
destination file