diff --git a/docs/telegram-bot-api/index.html b/docs/telegram-bot-api/index.html index a084656..eb0b577 100644 --- a/docs/telegram-bot-api/index.html +++ b/docs/telegram-bot-api/index.html @@ -12,344 +12,344 @@ margin: 0; } -
-Use this method to send a game
+chat_id required | number Unique identifier for the target chat + |
game_short_name required | string Short name of the game, serves as the unique identifier for the game |
business_connection_id | string Unique identifier of the business connection on behalf of which the message will be sent + |
message_thread_id | number Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + |
disable_notification | boolean Sends the message silently |
protect_content | boolean Protects the contents of the sent message from forwarding and saving + |
allow_paid_broadcast | boolean Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message |
message_effect_id | string Unique identifier of the message effect to be added to the message; for private chats only + |
object (ReplyParameters) Description of the message to reply to + | |
object (InlineKeyboardMarkup) A JSON-serialized object for an inline keyboard |
"Message"
Use this method to set the score of the specified user in a game message
+user_id required | number User identifier + |
score required | number New score, must be non-negative + |
force | boolean Pass True if the high score is allowed to decrease |
disable_edit_message | boolean Pass True if the game message should not be automatically edited to include the current scoreboard + |
chat_id | number Required if inline_message_id is not specified |
message_id | number Required if inline_message_id is not specified |
inline_message_id | string Required if chat_id and message_id are not specified |
"Message | boolean"
Use this method to receive incoming updates using long polling (wiki)
+offset | number Identifier of the first update to be returned |
limit | number Limits the number of updates to be retrieved |
timeout | number Timeout in seconds for long polling |
allowed_updates | Array of strings A JSON-serialized list of the update types you want your bot to receive |
"Update[]"
Use this method to specify a URL and receive incoming updates via an outgoing webhook
Whenever there is an update for the bot, we will send an HTTPS POST request to the specified URL, containing a JSON-serialized Update
In case of an unsuccessful request (a request with response HTTP status code different from 2XY), we will repeat the request and give up after a reasonable amount of attempts
If you'd like to make sure that the webhook was set by you, you can specify secret data in the parameter secret_token
If specified, the request will contain a header “X-Telegram-Bot-Api-Secret-Token” with the secret token as content.
url required | string HTTPS URL to send updates to |
certificate | string <binary> (InputFile) Upload your public key certificate so that the root certificate in use can be checked |
ip_address | string The fixed IP address which will be used to send webhook requests instead of the IP address resolved through DNS + |
max_connections | number The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery, 1-100 |
allowed_updates | Array of strings A JSON-serialized list of the update types you want your bot to receive |
drop_pending_updates | boolean Pass True to drop all pending updates + |
secret_token | string A secret token to be sent in a header “X-Telegram-Bot-Api-Secret-Token” in every webhook request, 1-256 characters |
"boolean"
Use this method to send answers to an inline query
.
No more than 50 results per query are allowed.
inline_query_id required | string Unique identifier for the answered query + |
required | Array of InlineQueryResultCachedAudio (object) or InlineQueryResultCachedDocument (object) or InlineQueryResultCachedGif (object) or InlineQueryResultCachedMpeg4Gif (object) or InlineQueryResultCachedPhoto (object) or InlineQueryResultCachedSticker (object) or InlineQueryResultCachedVideo (object) or InlineQueryResultCachedVoice (object) or InlineQueryResultArticle (object) or InlineQueryResultAudio (object) or InlineQueryResultContact (object) or InlineQueryResultGame (object) or InlineQueryResultDocument (object) or InlineQueryResultGif (object) or InlineQueryResultLocation (object) or InlineQueryResultMpeg4Gif (object) or InlineQueryResultPhoto (object) or InlineQueryResultVenue (object) or InlineQueryResultVideo (object) or InlineQueryResultVoice (object) (InlineQueryResult) A JSON-serialized array of results for the inline query + |
cache_time | number The maximum amount of time in seconds that the result of the inline query may be cached on the server |
is_personal | boolean Pass True if results may be cached on the server side only for the user that sent the query |
next_offset | string Pass the offset that a client should send in the next query with the same text to receive more results |
object (InlineQueryResultsButton) A JSON-serialized object describing a button to be shown above inline query results + |
"boolean"
Use this method to set the result of an interaction with a Web App and send a corresponding message on behalf of the user to the chat from which the query originated
+web_app_query_id required | string Unique identifier for the query to be answered + |
required | object or object or object or object or object or object or object or object or object or object or object or object or object or object or object or object or object or object or object or object (InlineQueryResult) |
"SentWebAppMessage"
Stores a message that can be sent by a user of a Mini App
+user_id required | number Unique identifier of the target user that can use the prepared message + |
required | object or object or object or object or object or object or object or object or object or object or object or object or object or object or object or object or object or object or object or object (InlineQueryResult) |
allow_user_chats | boolean Pass True if the message can be sent to private chats with users + |
allow_bot_chats | boolean Pass True if the message can be sent to private chats with bots + |
allow_group_chats | boolean Pass True if the message can be sent to group and supergroup chats + |
allow_channel_chats | boolean Pass True if the message can be sent to channel chats + |
"PreparedInlineMessage"
Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an Update with the field pre_checkout_query
Use this method to respond to such pre-checkout queries
Note: The Bot API must receive an answer within 10 seconds after the pre-checkout query was sent.
pre_checkout_query_id required | string Unique identifier for the query to be answered + |
ok required | boolean Specify True if everything is alright (goods are available, etc.) and the bot is ready to proceed with the order |
error_message | string Required if ok is False |
"boolean"
If you sent an invoice requesting a shipping address and the parameter is_flexible was specified, the Bot API will send an Update with a shipping_query field to the bot
Use this method to reply to shipping queries
shipping_query_id required | string Unique identifier for the query to be answered + |
ok required | boolean Pass True if delivery to the specified address is possible and False if there are any problems (for example, if delivery to the specified address is not possible) + |
Array of objects (ShippingOption) Required if ok is True | |
error_message | string Required if ok is False |
"boolean"
Use this method to create a link for an invoice
+title required | string Product name, 1-32 characters + |
description required | string Product description, 1-255 characters + |
payload required | string Bot-defined invoice payload, 1-128 bytes |
currency required | string Three-letter ISO 4217 currency code, see more on currencies |
required | Array of objects (LabeledPrice) Price breakdown, a JSON-serialized list of components (e.g |
business_connection_id | string Unique identifier of the business connection on behalf of which the link will be created |
provider_token | string Payment provider token, obtained via @BotFather |
subscription_period | number The number of seconds the subscription will be active for before the next payment |
max_tip_amount | number The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double) |
suggested_tip_amounts | Array of numbers A JSON-serialized array of suggested amounts of tips in the smallest units of the currency (integer, not float/double) |
provider_data | string JSON-serialized data about the invoice, which will be shared with the payment provider |
photo_url | string URL of the product photo for the invoice |
photo_size | number Photo size in bytes + |
photo_width | number Photo width + |
photo_height | number Photo height + |
need_name | boolean Pass True if you require the user's full name to complete the order |
need_phone_number | boolean Pass True if you require the user's phone number to complete the order |
need_email | boolean Pass True if you require the user's email address to complete the order |
need_shipping_address | boolean Pass True if you require the user's shipping address to complete the order |
send_phone_number_to_provider | boolean Pass True if the user's phone number should be sent to the provider |
send_email_to_provider | boolean Pass True if the user's email address should be sent to the provider |
is_flexible | boolean Pass True if the final price depends on the shipping method |
"string"
Allows the bot to cancel or re-enable extension of a subscription paid in Telegram Stars
+user_id required | number Identifier of the user whose subscription will be edited + |
telegram_payment_charge_id required | string Telegram payment identifier for the subscription + |
is_canceled required | boolean Pass True to cancel extension of the user subscription; the subscription must be active up to the end of the current subscription period |
"boolean"
Returns the bot's Telegram Star transactions in chronological order
+offset | number Number of transactions to skip in the response + |
limit | number The maximum number of transactions to be retrieved |
"StarTransactions"
Refunds a successful payment in Telegram Stars
+user_id required | number Identifier of the user whose payment will be refunded + |
telegram_payment_charge_id required | string Telegram payment identifier + |
"boolean"
Use this method to send invoices
+required | number or string Unique identifier for the target chat or username of the target channel (in the format @channelusername) + |
title required | string Product name, 1-32 characters + |
description required | string Product description, 1-255 characters + |
payload required | string Bot-defined invoice payload, 1-128 bytes |
currency required | string Three-letter ISO 4217 currency code, see more on currencies |
required | Array of objects (LabeledPrice) Price breakdown, a JSON-serialized list of components (e.g |
message_thread_id | number Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + |
provider_token | string Payment provider token, obtained via @BotFather |
max_tip_amount | number The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double) |
suggested_tip_amounts | Array of numbers A JSON-serialized array of suggested amounts of tips in the smallest units of the currency (integer, not float/double) |
start_parameter | string Unique deep-linking parameter |
provider_data | string JSON-serialized data about the invoice, which will be shared with the payment provider |
photo_url | string URL of the product photo for the invoice |
photo_size | number Photo size in bytes + |
photo_width | number Photo width + |
photo_height | number Photo height + |
need_name | boolean Pass True if you require the user's full name to complete the order |
need_phone_number | boolean Pass True if you require the user's phone number to complete the order |
need_email | boolean Pass True if you require the user's email address to complete the order |
need_shipping_address | boolean Pass True if you require the user's shipping address to complete the order |
send_phone_number_to_provider | boolean Pass True if the user's phone number should be sent to the provider |
send_email_to_provider | boolean Pass True if the user's email address should be sent to the provider |
is_flexible | boolean Pass True if the final price depends on the shipping method |
disable_notification | boolean Sends the message silently |
protect_content | boolean Protects the contents of the sent message from forwarding and saving + |
allow_paid_broadcast | boolean Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message |
message_effect_id | string Unique identifier of the message effect to be added to the message; for private chats only + |
object (ReplyParameters) Description of the message to reply to + | |
object (InlineKeyboardMarkup) A JSON-serialized object for an inline keyboard |
"Message"
Use this method to add a new sticker to a set created by the bot
Emoji sticker sets can have up to 200 stickers
Other sticker sets can have up to 120 stickers
user_id required | number User identifier of sticker set owner + |
name required | string Sticker set name + |
required | object (InputSticker) A JSON-serialized object with information about the added sticker |
"boolean"
Use this method to create a new sticker set owned by a user
The bot will be able to edit the sticker set thus created
user_id required | number User identifier of created sticker set owner + |
name required | string Short name of sticker set, to be used in t.me/addstickers/ URLs (e.g., animals) |
title required | string Sticker set title, 1-64 characters + |
required | Array of objects (InputSticker) A JSON-serialized list of 1-50 initial stickers to be added to the sticker set + |
sticker_type | string Type of stickers in the set, pass “regular”, “mask”, or “custom_emoji” |
needs_repainting | boolean Pass True if stickers in the sticker set must be repainted to the color of text when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context; for custom emoji sticker sets only + |
"boolean"
Use this method to get information about custom emoji stickers by their identifiers
+custom_emoji_ids required | Array of strings A JSON-serialized list of custom emoji identifiers |
"Sticker[]"
Removes verification from a chat that is currently verified on behalf of the organization represented by the bot
+required | number or string Unique identifier for the target chat or username of the target channel (in the format @channelusername) + |
"boolean"
Removes verification from a user who is currently verified on behalf of the organization represented by the bot
+user_id required | number Unique identifier of the target user + |
"boolean"
Use this method to replace an existing sticker in a sticker set with a new one
The method is equivalent to calling deleteStickerFromSet, then addStickerToSet, then setStickerPositionInSet
user_id required | number User identifier of the sticker set owner + |
name required | string Sticker set name + |
old_sticker required | string File identifier of the replaced sticker + |
required | object (InputSticker) A JSON-serialized object with information about the added sticker |
"boolean"
Sends a gift to the given user
The gift can't be converted to Telegram Stars by the user
user_id required | number Unique identifier of the target user that will receive the gift + |
gift_id required | string Identifier of the gift + |
pay_for_upgrade | boolean Pass True to pay for the gift upgrade from the bot's balance, thereby making the upgrade free for the receiver + |
text | string Text that will be shown along with the gift; 0-255 characters + |
string Mode for parsing entities in the text | |
Array of objects (MessageEntity) A JSON-serialized list of special entities that appear in the gift text |
"boolean"
Use this method to send static .WEBP, animated .TGS, or video .WEBM stickers
+required | number or string Unique identifier for the target chat or username of the target channel (in the format @channelusername) + |
required | InputFile (string) or string Sticker to send |
business_connection_id | string Unique identifier of the business connection on behalf of which the message will be sent + |
message_thread_id | number Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + |
emoji | string Emoji associated with the sticker; only for just uploaded stickers + |
disable_notification | boolean Sends the message silently |
protect_content | boolean Protects the contents of the sent message from forwarding and saving + |
allow_paid_broadcast | boolean Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message |
message_effect_id | string Unique identifier of the message effect to be added to the message; for private chats only + |
object (ReplyParameters) Description of the message to reply to + | |
InlineKeyboardMarkup (object) or ReplyKeyboardMarkup (object) or ReplyKeyboardRemove (object) or ForceReply (object) Additional interface options |
"Message"
Use this method to set the thumbnail of a custom emoji sticker set
+name required | string Sticker set name + |
custom_emoji_id | string Custom emoji identifier of a sticker from the sticker set; pass an empty string to drop the thumbnail and use the first sticker as the thumbnail. + |
"boolean"
Use this method to change the list of emoji assigned to a regular or custom emoji sticker
The sticker must belong to a sticker set created by the bot
sticker required | string File identifier of the sticker + |
emoji_list required | Array of strings A JSON-serialized list of 1-20 emoji associated with the sticker + |
"boolean"
Use this method to change search keywords assigned to a regular or custom emoji sticker
The sticker must belong to a sticker set created by the bot
sticker required | string File identifier of the sticker + |
keywords | Array of strings A JSON-serialized list of 0-20 search keywords for the sticker with total length of up to 64 characters + |
"boolean"
Use this method to change the mask position of a mask sticker
The sticker must belong to a sticker set that was created by the bot
sticker required | string File identifier of the sticker + |
object (MaskPosition) A JSON-serialized object with the position where the mask should be placed on faces |
"boolean"
Use this method to move a sticker in a set created by the bot to a specific position
+sticker required | string File identifier of the sticker + |
position required | number New sticker position in the set, zero-based + |
"boolean"
Use this method to set the thumbnail of a regular or mask sticker set
The format of the thumbnail file must match the format of the stickers in the set
name required | string Sticker set name + |
user_id required | number User identifier of the sticker set owner + |
format required | string Enum: "static" "animated" "video" Format of the thumbnail, must be one of “static” for a .WEBP or .PNG image, “animated” for a .TGS animation, or “video” for a .WEBM video + |
InputFile (string) or string A .WEBP or .PNG image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a .TGS animation with a thumbnail up to 32 kilobytes in size (see https://core.telegram.org/stickers#animation-requirements for animated sticker technical requirements), or a .WEBM video with the thumbnail up to 32 kilobytes in size; see https://core.telegram.org/stickers#video-requirements for video sticker technical requirements |
"boolean"
Use this method to upload a file with a sticker for later use in the createNewStickerSet, addStickerToSet, or replaceStickerInSet methods (the file can be used multiple times)
+user_id required | number User identifier of sticker file owner + |
sticker required | string <binary> (InputFile) A file with the sticker in .WEBP, .PNG, .TGS, or .WEBM format |
sticker_format required | string Enum: "static" "animated" "video" Format of the sticker, must be one of “static”, “animated”, “video” + |
"File"
Verifies a chat on behalf of the organization which is represented by the bot
+required | number or string Unique identifier for the target chat or username of the target channel (in the format @channelusername) + |
custom_description | string Custom description for the verification; 0-70 characters |
"boolean"
Verifies a user on behalf of the organization which is represented by the bot
+user_id required | number Unique identifier of the target user + |
custom_description | string Custom description for the verification; 0-70 characters |
"boolean"
Informs a user that some of the Telegram Passport elements they provided contains errors
The user will not be able to re-submit their Passport to you until the errors are fixed (the contents of the field for which you returned the error must change)
Use this if the data submitted by the user doesn't satisfy the standards your service requires for any reason
For example, if a birthday date seems invalid, a submitted document is blurry, a scan shows evidence of tampering, etc
Supply some details in the error message to make sure the user knows how to correct the issues.
user_id required | number User identifier + |
required | Array of PassportElementErrorDataField (object) or PassportElementErrorFrontSide (object) or PassportElementErrorReverseSide (object) or PassportElementErrorSelfie (object) or PassportElementErrorFile (object) or PassportElementErrorFiles (object) or PassportElementErrorTranslationFile (object) or PassportElementErrorTranslationFiles (object) or PassportElementErrorUnspecified (object) (PassportElementError) A JSON-serialized array describing the errors + |
"boolean"
Use this method to delete a message, including service messages, with the following limitations:- A message can only be deleted if it was sent less than 48 hours ago
.
- Service messages about a supergroup, channel, or forum topic creation can't be deleted
.
- A dice message in a private chat can only be deleted if it was sent more than 24 hours ago
.
- Bots can delete outgoing messages in private chats, groups, and supergroups
.
- Bots can delete incoming messages in private chats
.
- Bots granted can_post_messages permissions can delete outgoing messages in channels
.
- If the bot is an administrator of a group, it can delete any message there
.
- If the bot has can_delete_messages permission in a supergroup or a channel, it can delete any message there
.
required | number or string Unique identifier for the target chat or username of the target channel (in the format @channelusername) + |
message_id required | number Identifier of the message to delete + |
"boolean"
Use this method to delete multiple messages simultaneously
If some of the specified messages can't be found, they are skipped
required | number or string Unique identifier for the target chat or username of the target channel (in the format @channelusername) + |
message_ids required | Array of numbers A JSON-serialized list of 1-100 identifiers of messages to delete |
"boolean"
Use this method to edit captions of messages
Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.
business_connection_id | string Unique identifier of the business connection on behalf of which the message to be edited was sent + |
number or string Required if inline_message_id is not specified | |
message_id | number Required if inline_message_id is not specified |
inline_message_id | string Required if chat_id and message_id are not specified |
caption | string New caption of the message, 0-1024 characters after entities parsing + |
string Mode for parsing entities in the message caption | |
Array of objects (MessageEntity) 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 Pass True, if the caption must be shown above the message media |
object (InlineKeyboardMarkup) A JSON-serialized object for an inline keyboard. + |
"Message | boolean"
Use this method to edit live location messages
A location can be edited until its live_period expires or editing is explicitly disabled by a call to stopMessageLiveLocation
latitude required | number Latitude of new location + |
longitude required | number Longitude of new location + |
business_connection_id | string Unique identifier of the business connection on behalf of which the message to be edited was sent + |
number or string Required if inline_message_id is not specified | |
message_id | number Required if inline_message_id is not specified |
inline_message_id | string Required if chat_id and message_id are not specified |
live_period | number New period in seconds during which the location can be updated, starting from the message send date |
horizontal_accuracy | number The radius of uncertainty for the location, measured in meters; 0-1500 + |
heading | number Direction in which the user is moving, in degrees |
proximity_alert_radius | number The maximum distance for proximity alerts about approaching another chat member, in meters |
object (InlineKeyboardMarkup) A JSON-serialized object for a new inline keyboard. + |
"Message | boolean"
Use this method to edit animation, audio, document, photo, or video messages, or to add media to text messages
If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise
When an inline message is edited, a new file can't be uploaded; use a previously uploaded file via its file_id or specify a URL
Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.
required | object or object or object or object or object (InputMedia) |
business_connection_id | string Unique identifier of the business connection on behalf of which the message to be edited was sent + |
number or string Required if inline_message_id is not specified | |
message_id | number Required if inline_message_id is not specified |
inline_message_id | string Required if chat_id and message_id are not specified |
object (InlineKeyboardMarkup) A JSON-serialized object for a new inline keyboard. + |
"Message | boolean"
Use this method to edit only the reply markup of messages
Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.
business_connection_id | string Unique identifier of the business connection on behalf of which the message to be edited was sent + |
number or string Required if inline_message_id is not specified | |
message_id | number Required if inline_message_id is not specified |
inline_message_id | string Required if chat_id and message_id are not specified |
object (InlineKeyboardMarkup) A JSON-serialized object for an inline keyboard. + |
"Message | boolean"
Use this method to edit text and game messages
Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.
text required | string New text of the message, 1-4096 characters after entities parsing + |
business_connection_id | string Unique identifier of the business connection on behalf of which the message to be edited was sent + |
number or string Required if inline_message_id is not specified | |
message_id | number Required if inline_message_id is not specified |
inline_message_id | string Required if chat_id and message_id are not specified |
string Mode for parsing entities in the message text | |
Array of objects (MessageEntity) A JSON-serialized list of special entities that appear in message text, which can be specified instead of parse_mode + | |
object (LinkPreviewOptions) Link preview generation options for the message + | |
object (InlineKeyboardMarkup) A JSON-serialized object for an inline keyboard. + |
"Message | boolean"
Use this method to stop updating a live location message before live_period expires
+business_connection_id | string Unique identifier of the business connection on behalf of which the message to be edited was sent + |
number or string Required if inline_message_id is not specified | |
message_id | number Required if inline_message_id is not specified |
inline_message_id | string Required if chat_id and message_id are not specified |
object (InlineKeyboardMarkup) A JSON-serialized object for a new inline keyboard. + |
"Message | boolean"
Use this method to stop a poll which was sent by the bot
+required | number or string Unique identifier for the target chat or username of the target channel (in the format @channelusername) + |
message_id required | number Identifier of the original message with the poll + |
business_connection_id | string Unique identifier of the business connection on behalf of which the message to be edited was sent + |
object (InlineKeyboardMarkup) A JSON-serialized object for a new message inline keyboard. + |
"Poll"