Data about the connection of the bot with a business account
Date the connection was established in Unix time
True, if the connection is active
Unique identifier of the business connection
Optional
permissionsPermissions of the business bot
Business account user that created the business connection
Identifier of a private chat with the user who created the business connection
The client that instantiated this
Date the connection was established
Return the timestamp connection was established, in milliseconds
Protected
_cloneProtected
_patchProtected
_updateConverts a given regular gift to Telegram Stars. Requires the can_convert_gifts_to_stars business bot right.
Unique identifier of the regular gift that should be converted to Telegram Stars.
Returns True on success.
Removes the current profile photo of a managed business account. Requires the can_edit_profile_photo business bot right.
Optional
isPublic: booleanPass True to remove the public photo, which is visible even if the main photo is hidden by the business account's privacy settings. After the main photo is removed, the previous profile photo (if present) becomes the main photo.
Returns True on success.
Delete messages on behalf of a business account. Requires the can_delete_outgoing_messages business bot right to delete messages sent by the bot itself, or the can_delete_all_messages business bot right to delete any message.
A list of 1-100 identifiers of messages to delete. All messages must be from the same chat. See deleteMessage for limitations on which messages can be deleted.
Returns True on success.
Returns the gifts received and owned by a managed business account. Requires the can_view_gifts_and_stars business bot right.
Optional
options: Omit<out parameters.
Returns OwnedGifts on success.
Returns the amount of Telegram Stars owned by a managed business account. Requires the can_view_gifts_and_stars business bot right.
Returns StarAmount on success.
Gifts a Telegram Premium subscription to the given user.
Number of months the Telegram Premium subscription will be active for the user; must be one of 3, 6, or 12.
Number of Telegram Stars to pay for the Telegram Premium subscription; must be 1000 for 3 months, 1500 for 6 months, and 2500 for 12 months.
Optional
options: Omit<out parameters.
Returns True on success.
Posts a story on behalf of a managed business account. Requires the can_manage_stories business bot right.
Content of the story.
Period after which the story is moved to the archive, in seconds; must be one of 6 * 3600, 12 * 3600, 86400, or 2 * 86400.
Optional
options: Omit<out parameters.
Returns Story on success.
Marks incoming message as read on behalf of a business account. Requires the can_read_messages business bot right.
Unique identifier of the message to mark as read.
Optional
chatId: string | numberUnique identifier of the chat in which the message was received. The chat must have been active in the last 24 hours.
Returns True on success.
Stores a message that can be sent by a user of a Mini App.
An object describing the message to be sent.
Optional
options: Omit<out parameters.
Returns a PreparedInlineMessage object.
Use this method to send text messages.
Text of the message to be sent, 1-4096 characters after entities parsing and media group options
Optional
options: Omit<out parameters
On success, the sent Message is returned.
Use this method to send text messages.
Text of the message to be sent, 1-4096 characters after entities parsing and media group options
On success, the sent Message is returned.
Use this method to send text messages.
Text of the message to be sent, 1-4096 characters after entities parsing and media group options
Optional
options: Omit<out parameters
On success, the sent Message is returned.
Sends a gift to the given user or channel chat. The gift can't be converted to Telegram Stars by the receive.
Identifier of the gift.
Optional
options: Omit<out parameters.
Returns True on success.
Changes the privacy settings pertaining to incoming gifts in a managed business account. Requires the can_change_gift_settings business bot right.
Pass True, if a button for sending a gift to the user or by the business account must always be shown in the input field.
Types of gifts accepted by the business account Returns True on success.
Changes the first and last name of a managed business account. Requires the can_change_name business bot right. Returns True on success.
The new value of the first name for the business account; 1-64 characters.
Optional
lastName: stringThe new value of the last name for the business account; 0-64 characters.
Returns True on success.
Changes the profile photo of a managed business account. Requires the can_edit_profile_photo business bot right.
The new profile photo to set.
Optional
isPublic: booleanPass True to set the public photo, which will be visible even if the main photo is hidden by the business account's privacy settings. An account can have only one public photo.
Returns True on success.
Changes the username of a managed business account. Requires the can_change_username business bot right. Returns True on success.
Optional
username: stringThe new value of the username for the business account; 0-32 characters.
Returns True on success.
Changes the emoji status for a given user that previously allowed the bot to manage their emoji status via the Mini App method requestEmojiStatusAccess.
Optional
options: { emojiStatusCustomEmojiId?: string; emojiStatusExpirationDate?: number }out parameters.
Returns True on success.
Allows the bot to cancel or re-enable extension of a subscription paid in Telegram Stars.
Telegram payment identifier for the subscription.
Pass True to cancel extension of the user subscription; the subscription must be active up to the end of the current subscription period. Pass False to allow the user to re-enable a subscription that was previously canceled by the bot.
Returns True on success.
Flatten an object. Any properties that are collections will get converted to an array of keys.
Optional
propsRecursive: booleanOptional. If true, calls toJSON method on nested objects.
Optional. Specific properties to include/exclude, or rename.
Flattened object.
Transfers Telegram Stars from the business account balance to the bot's balance. Requires the can_transfer_stars business bot right.
Number of Telegram Stars to transfer; 1-10000.
Returns True on success.
Transfers an owned unique gift to another user. Requires the can_transfer_and_upgrade_gifts business bot right. Requires can_transfer_stars business bot right if the transfer is paid.
out parameters.
Returns True on success.
Upgrades a given regular gift to a unique gift. Requires the can_transfer_and_upgrade_gifts business bot right. Additionally requires the can_transfer_stars business bot right if the upgrade is paid.
Unique identifier of the regular gift that should be upgraded to a unique one.
Optional
options: Omit<out parameters.
Returns True on success.
Verifies a user on behalf of the organization which is represented by the bot.
Optional
description: stringCustom description for the verification; 0-70 characters. Must be empty if the organization isn't allowed to provide a custom verification description.
Returns True on success.
The client that instantiated this