business_message |
Message |
-Optional. New non-service message from a connected business account |
+Optional. New message from a connected business account |
edited_business_message |
@@ -822,7 +837,7 @@
Optional. Options used for link preview generation for the message, if it is a text message and link preview options were changed |
+effect_id |
+String |
+Optional. Unique identifier of the message effect added to the message |
+
+
animation |
Animation |
Optional. Message is an animation, information about the animation. For backward compatibility, when this field is set, the document field will also be set |
@@ -1098,6 +1118,11 @@
Optional. For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption |
+show_caption_above_media |
+True |
+Optional. True, if the caption must be shown above the message media |
+
+
has_media_spoiler |
True |
Optional. True, if the message media is covered by a spoiler animation |
@@ -1390,7 +1415,7 @@ without usernames), “custom_emoji” (for inline custom emoji stickers)
+Type of the entity. Currently, can be “mention” (@username ), “hashtag” (#hashtag ), “cashtag” ($USD ), “bot_command” (/start@jobs_bot ), “url” (https://telegram.org ), “email” (do-not-reply@telegram.org ), “phone_number” (+1-212-555-0123 ), “bold” (bold text), “italic” (italic text), “underline” (underlined text), “strikethrough” (strikethrough text), “spoiler” (spoiler message), “blockquote” (block quotation), “expandable_blockquote” (collapsed-by-default block quotation), “code” (monowidth string), “pre” (monowidth block), “text_link” (for clickable text URLs), “text_mention” (for users without usernames), “custom_emoji” (for inline custom emoji stickers) |
offset |
@@ -3334,7 +3359,7 @@
InlineKeyboardButton
-This object represents one button of an inline keyboard. You must use exactly one of the optional fields.
+This object represents one button of an inline keyboard. Exactly one of the optional fields must be used to specify type of the button.
@@ -4009,7 +4034,7 @@
via_join_request |
Boolean |
-Optional. True, if the user joined the chat after sending a direct join request and being approved by an administrator |
+Optional. True, if the user joined the chat after sending a direct join request without using an invite link and being approved by an administrator |
via_chat_folder_invite_link |
@@ -5474,6 +5499,11 @@ Optional. 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 |
+
+
width |
Integer |
Optional. Animation width |
@@ -5868,6 +5908,12 @@ ReplyParameters
Optional |
@@ -5884,7 +5930,7 @@ Formatting options
The Bot API supports basic formatting for messages. You can use bold, italic, underlined, strikethrough, spoiler text, block quotations as well as inline links and pre-formatted code in your bots' messages. Telegram clients will render them accordingly. You can specify text entities directly, or use markdown-style or HTML-style formatting.
Note that Telegram clients will display an alert to the user before opening an inline link ('Open this link?' together with the full URL).
-Message entities can be nested, providing following restrictions are met:
- If two entities have common characters, then one of them is fully contained inside another.
- bold, italic, underline, strikethrough, and spoiler entities can contain and can be part of any other entities, except pre and code.
- blockquote entities can't be nested.
- All other entities can't contain each other.
+Message entities can be nested, providing following restrictions are met:
- If two entities have common characters, then one of them is fully contained inside another.
- bold, italic, underline, strikethrough, and spoiler entities can contain and can be part of any other entities, except pre and code.
- blockquote and expandable_blockquote entities can't be nested.
- All other entities can't contain each other.
Links tg://user?id=<user_id>
can be used to mention a user by their identifier without using a username. Please note:
- These links will work only if they are used inside an inline link or in an inline keyboard button. For example, they will not work, when used in a message text.
@@ -5911,16 +5957,22 @@
+>Block quotation continued
+>Block quotation continued
+>The last line of the block quotation
+**>The expandable block quotation started right after the previous block quotation
+>It is separated from the previous block quotation by an empty bold entity
+>Expandable block quotation continued
+>Hidden by default part of the expandable block quotation started
+>Expandable block quotation continued
+>The last line of the expandable block quotation with the expandability mark||
Please note:
- Any character with code between 1 and 126 inclusively can be escaped anywhere with a preceding '\' character, in which case it is treated as an ordinary character and not a part of the markup. This implies that '\' character usually must be escaped with a preceding '\' character.
- Inside
pre
and code
entities, all '`' and '\' characters must be escaped with a preceding '\' character.
- Inside the
(...)
part of the inline link and custom emoji definition, all ')' and '\' must be escaped with a preceding '\' character.
- In all other places characters '_', '*', '[', ']', '(', ')', '~', '`', '>', '#', '+', '-', '=', '|', '{', '}', '.', '!' must be escaped with the preceding character '\'.
-- In case of ambiguity between
italic
and underline
entities __
is always greadily treated from left to right as beginning or end of underline
entity, so instead of ___italic underline___
use ___italic underline_\r__
, where \r
is a character with code 13, which will be ignored.
+- In case of ambiguity between
italic
and underline
entities __
is always greadily treated from left to right as beginning or end of an underline
entity, so instead of ___italic underline___
use ___italic underline_**__
, adding an empty bold entity as a separator.
- A valid emoji must be provided as an alternative value for the custom emoji. The emoji will be shown instead of the custom emoji in places where a custom emoji cannot be displayed (e.g., system notifications) or if the message is forwarded by a non-premium user. It is recommended to use the emoji from the emoji field of the custom emoji sticker.
- Custom emoji entities can only be used by bots that purchased additional usernames on Fragment.
@@ -5938,7 +5990,8 @@ MarkdownV2 instead.
-
- There is no way to specify “underline”, “strikethrough”, “spoiler”, “blockquote” and “custom_emoji” entities, use parse mode MarkdownV2 instead.
+- There is no way to specify “underline”, “strikethrough”, “spoiler”, “blockquote”, “expandable_blockquote” and “custom_emoji” entities, use parse mode MarkdownV2 instead.
- To escape characters '_', '*', '`', '[' outside of an entity, prepend the characters '\' before them.
- Escaping inside entities is not allowed, so entity must be closed first and reopened again: use
_snake_\__case_
for italic snake_case
and *2*\**2=4*
for bold 2*2=4
.
@@ -6261,6 +6314,12 @@
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 |
+
+
has_spoiler |
Boolean |
Optional |
@@ -6279,6 +6338,12 @@
Protects the contents of the sent message from forwarding and saving |
+message_effect_id |
+String |
+Optional |
+Unique identifier of the message effect to be added to the message |
+
+
reply_parameters |
ReplyParameters |
Optional |
@@ -6384,6 +6449,12 @@
Protects the contents of the sent message from forwarding and saving |
+message_effect_id |
+String |
+Optional |
+Unique identifier of the message effect to be added to the message |
+
+
reply_parameters |
ReplyParameters |
Optional |
@@ -6476,6 +6547,12 @@ ReplyParameters
Optional |
@@ -6568,6 +6645,12 @@
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 |
+
+
has_spoiler |
Boolean |
Optional |
@@ -6592,6 +6675,12 @@
Protects the contents of the sent message from forwarding and saving |
+message_effect_id |
+String |
+Optional |
+Unique identifier of the message effect to be added to the message |
+
+
reply_parameters |
ReplyParameters |
Optional |
@@ -6684,6 +6773,12 @@ ReplyParameters
Optional |
@@ -6788,6 +6889,12 @@
Protects the contents of the sent message from forwarding and saving |
+message_effect_id |
+String |
+Optional |
+Unique identifier of the message effect to be added to the message |
+
+
reply_parameters |
ReplyParameters |
Optional |
@@ -6868,6 +6975,12 @@ ReplyParameters
Optional |
@@ -6930,6 +7043,12 @@ ReplyParameters
Optional |
@@ -7016,6 +7135,12 @@ ReplyParameters
Optional |
@@ -7120,6 +7245,12 @@
Protects the contents of the sent message from forwarding and saving |
+message_effect_id |
+String |
+Optional |
+Unique identifier of the message effect to be added to the message |
+
+
reply_parameters |
ReplyParameters |
Optional |
@@ -7200,6 +7331,12 @@ ReplyParameters
Optional |
@@ -7340,6 +7477,12 @@
Protects the contents of the sent message from forwarding and saving |
+message_effect_id |
+String |
+Optional |
+Unique identifier of the message effect to be added to the message |
+
+
reply_parameters |
ReplyParameters |
Optional |
@@ -7402,6 +7545,12 @@
Protects the contents of the sent message from forwarding |
+message_effect_id |
+String |
+Optional |
+Unique identifier of the message effect to be added to the message |
+
+
reply_parameters |
ReplyParameters |
Optional |
@@ -9248,6 +9397,12 @@ 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. Supported only for animation, photo and video messages. |
+
+
reply_markup |
InlineKeyboardMarkup |
Optional |
@@ -9787,6 +9942,12 @@ ReplyParameters
Optional |
@@ -10510,6 +10671,11 @@ InlineKeyboardMarkup
Optional. Inline keyboard attached to the message |
@@ -10593,6 +10759,11 @@ <
Optional. 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 |
+
+
reply_markup |
InlineKeyboardMarkup |
Optional. Inline keyboard attached to the message |
@@ -10676,6 +10847,11 @@ InlineKeyboardMarkup
Optional. Inline keyboard attached to the message |
@@ -10747,6 +10923,11 @@ InlineKeyboardMarkup
Optional. Inline keyboard attached to the message |
@@ -11374,6 +11560,11 @@ InlineKeyboardMarkup
Optional. Inline keyboard attached to the message |
@@ -11432,6 +11623,11 @@ InlineKeyboardMarkup
Optional. Inline keyboard attached to the message |
@@ -11596,6 +11792,11 @@ InlineKeyboardMarkup
Optional. Inline keyboard attached to the message |
@@ -11918,22 +12119,22 @@ @BotFather
+Optional. Payment provider token, obtained via @BotFather. Pass an empty string for payments in Telegram Stars. |
currency |
String |
-Three-letter ISO 4217 currency code, see more on currencies |
+Three-letter ISO 4217 currency code, see more on currencies. Pass “XTR” for payments in Telegram Stars. |
prices |
Array of LabeledPrice |
-Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.) |
+Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in Telegram Stars. |
max_tip_amount |
Integer |
-Optional. The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145 . See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0 |
+Optional. The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145 . See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in Telegram Stars. |
suggested_tip_amounts |
@@ -11968,37 +12169,37 @@ Telegram Stars.
need_phone_number |
Boolean |
-Optional. Pass True if you require the user's phone number to complete the order |
+Optional. Pass True if you require the user's phone number to complete the order. Ignored for payments in Telegram Stars. |
need_email |
Boolean |
-Optional. Pass True if you require the user's email address to complete the order |
+Optional. Pass True if you require the user's email address to complete the order. Ignored for payments in Telegram Stars. |
need_shipping_address |
Boolean |
-Optional. Pass True if you require the user's shipping address to complete the order |
+Optional. Pass True if you require the user's shipping address to complete the order. Ignored for payments in Telegram Stars. |
send_phone_number_to_provider |
Boolean |
-Optional. Pass True if the user's phone number should be sent to provider |
+Optional. Pass True if the user's phone number should be sent to the provider. Ignored for payments in Telegram Stars. |
send_email_to_provider |
Boolean |
-Optional. Pass True if the user's email address should be sent to provider |
+Optional. Pass True if the user's email address should be sent to the provider. Ignored for payments in Telegram Stars. |
is_flexible |
Boolean |
-Optional. Pass True if the final price depends on the shipping method |
+Optional. Pass True if the final price depends on the shipping method. Ignored for payments in Telegram Stars. |
@@ -12132,26 +12333,26 @@ @BotFather
+Optional |
+Payment provider token, obtained via @BotFather. Pass an empty string for payments in Telegram Stars. |
currency |
String |
Yes |
-Three-letter ISO 4217 currency code, see more on currencies |
+Three-letter ISO 4217 currency code, see more on currencies. Pass “XTR” for payments in Telegram Stars. |
prices |
Array of LabeledPrice |
Yes |
-Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.) |
+Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in Telegram Stars. |
max_tip_amount |
Integer |
Optional |
-The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145 . See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0 |
+The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145 . See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in Telegram Stars. |
suggested_tip_amounts |
@@ -12199,43 +12400,43 @@ Telegram Stars.
need_phone_number |
Boolean |
Optional |
-Pass True if you require the user's phone number to complete the order |
+Pass True if you require the user's phone number to complete the order. Ignored for payments in Telegram Stars. |
need_email |
Boolean |
Optional |
-Pass True if you require the user's email address to complete the order |
+Pass True if you require the user's email address to complete the order. Ignored for payments in Telegram Stars. |
need_shipping_address |
Boolean |
Optional |
-Pass True if you require the user's shipping address to complete the order |
+Pass True if you require the user's shipping address to complete the order. Ignored for payments in Telegram Stars. |
send_phone_number_to_provider |
Boolean |
Optional |
-Pass True if the user's phone number should be sent to provider |
+Pass True if the user's phone number should be sent to the provider. Ignored for payments in Telegram Stars. |
send_email_to_provider |
Boolean |
Optional |
-Pass True if the user's email address should be sent to provider |
+Pass True if the user's email address should be sent to the provider. Ignored for payments in Telegram Stars. |
is_flexible |
Boolean |
Optional |
-Pass True if the final price depends on the shipping method |
+Pass True if the final price depends on the shipping method. Ignored for payments in Telegram Stars. |
disable_notification |
@@ -12250,6 +12451,12 @@ ReplyParameters
Optional |
@@ -12296,26 +12503,26 @@
provider_token |
String |
-Yes |
-Payment provider token, obtained via BotFather |
+Optional |
+Payment provider token, obtained via @BotFather. Pass an empty string for payments in Telegram Stars. |
currency |
String |
Yes |
-Three-letter ISO 4217 currency code, see more on currencies |
+Three-letter ISO 4217 currency code, see more on currencies. Pass “XTR” for payments in Telegram Stars. |
prices |
Array of LabeledPrice |
Yes |
-Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.) |
+Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in Telegram Stars. |
max_tip_amount |
Integer |
Optional |
-The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145 . See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0 |
+The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145 . See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in Telegram Stars. |
suggested_tip_amounts |
@@ -12357,43 +12564,43 @@ need_name
Boolean |
Optional |
-Pass True if you require the user's full name to complete the order |
+Pass True if you require the user's full name to complete the order. Ignored for payments in Telegram Stars. |
need_phone_number |
Boolean |
Optional |
-Pass True if you require the user's phone number to complete the order |
+Pass True if you require the user's phone number to complete the order. Ignored for payments in Telegram Stars. |
need_email |
Boolean |
Optional |
-Pass True if you require the user's email address to complete the order |
+Pass True if you require the user's email address to complete the order. Ignored for payments in Telegram Stars. |
need_shipping_address |
Boolean |
Optional |
-Pass True if you require the user's shipping address to complete the order |
+Pass True if you require the user's shipping address to complete the order. Ignored for payments in Telegram Stars. |
send_phone_number_to_provider |
Boolean |
Optional |
-Pass True if the user's phone number should be sent to the provider |
+Pass True if the user's phone number should be sent to the provider. Ignored for payments in Telegram Stars. |
send_email_to_provider |
Boolean |
Optional |
-Pass True if the user's email address should be sent to the provider |
+Pass True if the user's email address should be sent to the provider. Ignored for payments in Telegram Stars. |
is_flexible |
Boolean |
Optional |
-Pass True if the final price depends on the shipping method |
+Pass True if the final price depends on the shipping method. Ignored for payments in Telegram Stars. |
@@ -12467,6 +12674,32 @@ refundStarPayment
+
Refunds a successful payment in Telegram Stars. Returns True on success.
+