From d96f2be74187d04eb94630715eddbf1d2420872d Mon Sep 17 00:00:00 2001
From: Egor Pugin @BotNews to be the first to know about the latest updates and join the discussion in @BotTalk
Bot API 7.6
+t.me
link in the class MenuButtonWebApp.Bot API 7.5
Describes the paid media added to a message.
+Field | +Type | +Description | +
---|---|---|
star_count | +Integer | +The number of Telegram Stars that must be paid to buy access to the media | +
paid_media | +Array of PaidMedia | +Information about the paid media | +
This object describes paid media. Currently, it can be one of
+ +The paid media isn't available before the payment.
+Field | +Type | +Description | +
---|---|---|
type | +String | +Type of the paid media, always “preview” | +
width | +Integer | +Optional. Media width as defined by the sender | +
height | +Integer | +Optional. Media height as defined by the sender | +
duration | +Integer | +Optional. Duration of the media in seconds as defined by the sender | +
The paid media is a photo.
+Field | +Type | +Description | +
---|---|---|
type | +String | +Type of the paid media, always “photo” | +
photo | +Array of PhotoSize | +The photo | +
The paid media is a video.
+Field | +Type | +Description | +
---|---|---|
type | +String | +Type of the paid media, always “video” | +
video | +Video | +The video | +
This object represents a phone contact.
Field | +Type | +Description | +
---|---|---|
type | +String | +Type of the media, must be photo | +
media | +String | +File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files » | +
The paid media to send is a video.
+Field | +Type | +Description | +
---|---|---|
type | +String | +Type of the media, must be video | +
media | +String | +File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files » | +
thumbnail | +InputFile or String | +Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files » | +
width | +Integer | +Optional. Video width | +
height | +Integer | +Optional. Video height | +
duration | +Integer | +Optional. Video duration in seconds | +
supports_streaming | +Boolean | +Optional. Pass True if the uploaded video is suitable for streaming | +
There are three ways to send files (photos, stickers, audio, media, etc.):
Use this method to copy messages of any kind. Service messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied. A quiz poll can be copied only if the value of the field correct_option_id is known to the bot. The method is analogous to the method forwardMessage, but the copied message doesn't have a link to the original message. Returns the MessageId of the sent message on success.
+Use this method to copy messages of any kind. Service messages, paid media messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied. A quiz poll can be copied only if the value of the field correct_option_id is known to the bot. The method is analogous to the method forwardMessage, but the copied message doesn't have a link to the original message. Returns the MessageId of the sent message on success.
Parameter | +Type | +Required | +Description | +
---|---|---|---|
chat_id | +Integer or String | +Yes | +Unique identifier for the target chat or username of the target channel (in the format @channelusername ) |
+
star_count | +Integer | +Yes | +The number of Telegram Stars that must be paid to buy access to the media | +
media | +Array of InputPaidMedia | +Yes | +A JSON-serialized array describing the media to be sent; up to 10 items | +
caption | +String | +Optional | +Media caption, 0-1024 characters after entities parsing | +
parse_mode | +String | +Optional | +Mode for parsing entities in the media caption. See formatting options for more details. | +
caption_entities | +Array of MessageEntity | +Optional | +A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode | +
show_caption_above_media | +Boolean | +Optional | +Pass True, if the caption must be shown above the message media | +
disable_notification | +Boolean | +Optional | +Sends the message silently. Users will receive a notification with no sound. | +
protect_content | +Boolean | +Optional | +Protects the contents of the sent message from forwarding and saving | +
reply_parameters | +ReplyParameters | +Optional | +Description of the message to reply to | +
reply_markup | +InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply | +Optional | +Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user | +
Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of Messages that were sent is returned.
invoice_payload | String | -Bot specified invoice payload | +Bot-specified invoice payload | |||||||||||
shipping_option_id | @@ -12937,7 +13232,7 @@invoice_payload | String | -Bot specified invoice payload | +Bot-specified invoice payload | ||||||||||
shipping_option_id | @@ -13068,10 +13363,39 @@
Field | +Type | +Description | +
---|---|---|
type | +String | +Type of the transaction partner, always “user” | +
user | +User | +Information about the user | +
invoice_payload | +String | +Optional. Bot-specified invoice payload | +
Describes a withdrawal transaction with Fragment.
Information about the user | +Type of the transaction partner, always “telegram_ads” |