diff --git a/data/web/core.telegram.org/bots/api.html b/data/web/core.telegram.org/bots/api.html index bbdccce9c5..96aac4ae5b 100644 --- a/data/web/core.telegram.org/bots/api.html +++ b/data/web/core.telegram.org/bots/api.html @@ -140,7 +140,7 @@ To learn how to create…">

Do I need a Local Bot API Server

The majority of bots will be OK with the default configuration, running on our servers. But if you feel that you need one of these features, you're welcome to switch to your own at any time.

Getting updates

-

There are two mutually exclusive ways of receiving updates for your bot — the getUpdates method on one hand and Webhooks on the other. Incoming updates are stored on the server until the bot receives them either way, but they will not be kept longer than 24 hours.

+

There are two mutually exclusive ways of receiving updates for your bot — the getUpdates method on one hand and webhooks on the other. Incoming updates are stored on the server until the bot receives them either way, but they will not be kept longer than 24 hours.

Regardless of which option you choose, you will receive JSON-serialized Update objects as a result.

Update

This object represents an incoming update.
At most one of the optional parameters can be present in any given update.

@@ -156,7 +156,7 @@ To learn how to create…"> update_id Integer -The update's unique identifier. Update identifiers start from a certain positive number and increase sequentially. This ID becomes especially handy if you're using Webhooks, since it allows you to ignore repeated updates or to restore the correct update sequence, should they get out of order. If there are no new updates for at least a week, then identifier of the next update will be chosen randomly instead of sequentially. +The update's unique identifier. Update identifiers start from a certain positive number and increase sequentially. This ID becomes especially handy if you're using webhooks, since it allows you to ignore repeated updates or to restore the correct update sequence, should they get out of order. If there are no new updates for at least a week, then identifier of the next update will be chosen randomly instead of sequentially. message @@ -272,8 +272,8 @@ To learn how to create…">

Notes
1. This method will not work if an outgoing webhook is set up.
2. In order to avoid getting duplicate updates, recalculate offset after each server response.

setWebhook

-

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, we will give up after a reasonable amount of attempts. Returns True on success.

-

If you'd like to make sure that the Webhook request comes from Telegram, we recommend using a secret path in the URL, e.g. https://www.example.com/<token>. Since nobody else knows your bot's token, you can be pretty sure it's us.

+

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, we will give up after a reasonable amount of attempts. Returns True on success.

+

If you'd like to make sure that the webhook request comes from Telegram, we recommend using a secret path in the URL, e.g. https://www.example.com/<token>. Since nobody else knows your bot's token, you can be pretty sure it's us.

@@ -288,7 +288,7 @@ To learn how to create…"> - + @@ -323,8 +323,8 @@ To learn how to create…">
url String YesHTTPS url to send updates to. Use an empty string to remove webhook integrationHTTPS URL to send updates to. Use an empty string to remove webhook integration
certificate
-

Notes
1. You will not be able to receive updates using getUpdates for as long as an outgoing webhook is set up.
2. To use a self-signed certificate, you need to upload your public key certificate using certificate parameter. Please upload as InputFile, sending a String will not work.
3. Ports currently supported for Webhooks: 443, 80, 88, 8443.

-

NEW! If you're having any trouble setting up webhooks, please check out this amazing guide to Webhooks.

+

Notes
1. You will not be able to receive updates using getUpdates for as long as an outgoing webhook is set up.
2. To use a self-signed certificate, you need to upload your public key certificate using certificate parameter. Please upload as InputFile, sending a String will not work.
3. Ports currently supported for webhooks: 443, 80, 88, 8443.

+

NEW! If you're having any trouble setting up webhooks, please check out this amazing guide to webhooks.

deleteWebhook

Use this method to remove webhook integration if you decide to switch back to getUpdates. Returns True on success.

@@ -938,7 +938,7 @@ To learn how to create…"> url String -Optional. For “text_link” only, url that will be opened after user taps on the text +Optional. For “text_link” only, URL that will be opened after user taps on the text user @@ -1198,7 +1198,7 @@ To learn how to create…"> mime_type String -Optional. Mime type of a file as defined by sender +Optional. Mime type of the file as defined by sender file_size @@ -1927,7 +1927,7 @@ To learn how to create…"> url String -Optional. HTTP or tg:// url to be opened when the button is pressed. Links tg://user?id=<user_id> can be used to mention a user by their ID without using a username, if this is allowed by their privacy settings. +Optional. HTTP or tg:// URL to be opened when the button is pressed. Links tg://user?id=<user_id> can be used to mention a user by their ID without using a username, if this is allowed by their privacy settings. callback_data @@ -2046,7 +2046,7 @@ To learn how to create…"> data String -Optional. Data associated with the callback button. Be aware that the message, which originated the query, can contain no callback buttons with this data. +Optional. Data associated with the callback button. Be aware that the message, from which originated the query, can contain no callback buttons with this data. game_short_name @@ -5699,7 +5699,7 @@ pre-formatted fixed-width code block written in the Python programming language

answerCallbackQuery

Use this method to send answers to callback queries sent from inline keyboards. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert. On success, True is returned.

-

Alternatively, the user can be redirected to the specified Game URL. For this option to work, you must first create a game for your bot via @Botfather and accept the terms. Otherwise, you may use links like t.me/your_bot?start=XXXX that open your bot with a parameter.

+

Alternatively, the user can be redirected to the specified Game URL. For this option to work, you must first create a game for your bot via @BotFather and accept the terms. Otherwise, you may use links like t.me/your_bot?start=XXXX that open your bot with a parameter.

@@ -5733,7 +5733,7 @@ pre-formatted fixed-width code block written in the Python programming language - + @@ -7108,7 +7108,7 @@ pre-formatted fixed-width code block written in the Python programming language - + @@ -8318,7 +8318,7 @@ pre-formatted fixed-width code block written in the Python programming language - + @@ -8348,12 +8348,12 @@ pre-formatted fixed-width code block written in the Python programming language - + - + @@ -8388,12 +8388,12 @@ pre-formatted fixed-width code block written in the Python programming language - + - + @@ -8440,7 +8440,7 @@ pre-formatted fixed-width code block written in the Python programming language
url String OptionalURL that will be opened by the user's client. If you have created a Game and accepted the conditions via @Botfather, specify the URL that opens your game — note that this will only work if the query comes from a callback_game button.

Otherwise, you may use links like t.me/your_bot?start=XXXX that open your bot with a parameter.
URL that will be opened by the user's client. If you have created a Game and accepted the conditions via @BotFather, specify the URL that opens your game — note that this will only work if the query comes from a callback_game button.

Otherwise, you may use links like t.me/your_bot?start=XXXX that open your bot with a parameter.
cache_time
mime_type StringMime type of the content of video url, “text/html” or “video/mp4”Mime type of the content of the video URL, “text/html” or “video/mp4”
thumb_url
provider_token StringPayment provider token, obtained via BotfatherPayment provider token, obtained via @BotFather
currency
photo_url StringOptional. URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. People like it better when they see what they are paying for.Optional. URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service.
photo_size IntegerOptional. Photo sizeOptional. Photo size in bytes
photo_width
send_phone_number_to_provider BooleanOptional. Pass True, if user's phone number should be sent to providerOptional. Pass True, if the user's phone number should be sent to provider
send_email_to_provider BooleanOptional. Pass True, if user's email address should be sent to providerOptional. Pass True, if the user's email address should be sent to provider
is_flexible
-

Note: It is necessary to enable inline feedback via @Botfather in order to receive these objects in updates.

+

Note: It is necessary to enable inline feedback via @BotFather in order to receive these objects in updates.

answerWebAppQuery

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. On success, a SentWebAppMessage object is returned.

@@ -8527,7 +8527,7 @@ pre-formatted fixed-width code block written in the Python programming language - + @@ -8563,7 +8563,7 @@ pre-formatted fixed-width code block written in the Python programming language - + @@ -8575,7 +8575,7 @@ pre-formatted fixed-width code block written in the Python programming language - + @@ -8617,13 +8617,13 @@ pre-formatted fixed-width code block written in the Python programming language - + - + @@ -9553,7 +9553,7 @@ pre-formatted fixed-width code block written in the Python programming language - + diff --git a/data/web/corefork.telegram.org/bots/api.html b/data/web/corefork.telegram.org/bots/api.html index 1c02dbd1da..cccd49ef1b 100644 --- a/data/web/corefork.telegram.org/bots/api.html +++ b/data/web/corefork.telegram.org/bots/api.html @@ -140,7 +140,7 @@ To learn how to create…">

Do I need a Local Bot API Server

The majority of bots will be OK with the default configuration, running on our servers. But if you feel that you need one of these features, you're welcome to switch to your own at any time.

Getting updates

-

There are two mutually exclusive ways of receiving updates for your bot — the getUpdates method on one hand and Webhooks on the other. Incoming updates are stored on the server until the bot receives them either way, but they will not be kept longer than 24 hours.

+

There are two mutually exclusive ways of receiving updates for your bot — the getUpdates method on one hand and webhooks on the other. Incoming updates are stored on the server until the bot receives them either way, but they will not be kept longer than 24 hours.

Regardless of which option you choose, you will receive JSON-serialized Update objects as a result.

Update

This object represents an incoming update.
At most one of the optional parameters can be present in any given update.

@@ -156,7 +156,7 @@ To learn how to create…"> - + @@ -272,8 +272,8 @@ To learn how to create…">

Notes
1. This method will not work if an outgoing webhook is set up.
2. In order to avoid getting duplicate updates, recalculate offset after each server response.

setWebhook

-

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, we will give up after a reasonable amount of attempts. Returns True on success.

-

If you'd like to make sure that the Webhook request comes from Telegram, we recommend using a secret path in the URL, e.g. https://www.example.com/<token>. Since nobody else knows your bot's token, you can be pretty sure it's us.

+

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, we will give up after a reasonable amount of attempts. Returns True on success.

+

If you'd like to make sure that the webhook request comes from Telegram, we recommend using a secret path in the URL, e.g. https://www.example.com/<token>. Since nobody else knows your bot's token, you can be pretty sure it's us.

provider_token String YesPayments provider token, obtained via BotfatherPayment provider token, obtained via @BotFather
currencyprovider_data String OptionalA JSON-serialized data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider.JSON-serialized data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider.
photo_urlphoto_size Integer OptionalPhoto sizePhoto size in bytes
photo_widthsend_phone_number_to_provider Boolean OptionalPass True, if user's phone number should be sent to providerPass True, if the user's phone number should be sent to provider
send_email_to_provider Boolean OptionalPass True, if user's email address should be sent to providerPass True, if the user's email address should be sent to provider
is_flexiblegame_short_name String YesShort name of the game, serves as the unique identifier for the game. Set up your games via Botfather.Short name of the game, serves as the unique identifier for the game. Set up your games via @BotFather.
disable_notification
update_id IntegerThe update's unique identifier. Update identifiers start from a certain positive number and increase sequentially. This ID becomes especially handy if you're using Webhooks, since it allows you to ignore repeated updates or to restore the correct update sequence, should they get out of order. If there are no new updates for at least a week, then identifier of the next update will be chosen randomly instead of sequentially.The update's unique identifier. Update identifiers start from a certain positive number and increase sequentially. This ID becomes especially handy if you're using webhooks, since it allows you to ignore repeated updates or to restore the correct update sequence, should they get out of order. If there are no new updates for at least a week, then identifier of the next update will be chosen randomly instead of sequentially.
message
@@ -288,7 +288,7 @@ To learn how to create…"> - + @@ -323,8 +323,8 @@ To learn how to create…">
url String YesHTTPS url to send updates to. Use an empty string to remove webhook integrationHTTPS URL to send updates to. Use an empty string to remove webhook integration
certificate
-

Notes
1. You will not be able to receive updates using getUpdates for as long as an outgoing webhook is set up.
2. To use a self-signed certificate, you need to upload your public key certificate using certificate parameter. Please upload as InputFile, sending a String will not work.
3. Ports currently supported for Webhooks: 443, 80, 88, 8443.

-

NEW! If you're having any trouble setting up webhooks, please check out this amazing guide to Webhooks.

+

Notes
1. You will not be able to receive updates using getUpdates for as long as an outgoing webhook is set up.
2. To use a self-signed certificate, you need to upload your public key certificate using certificate parameter. Please upload as InputFile, sending a String will not work.
3. Ports currently supported for webhooks: 443, 80, 88, 8443.

+

NEW! If you're having any trouble setting up webhooks, please check out this amazing guide to webhooks.

deleteWebhook

Use this method to remove webhook integration if you decide to switch back to getUpdates. Returns True on success.

@@ -938,7 +938,7 @@ To learn how to create…"> url String -Optional. For “text_link” only, url that will be opened after user taps on the text +Optional. For “text_link” only, URL that will be opened after user taps on the text user @@ -1198,7 +1198,7 @@ To learn how to create…"> mime_type String -Optional. Mime type of a file as defined by sender +Optional. Mime type of the file as defined by sender file_size @@ -1927,7 +1927,7 @@ To learn how to create…"> url String -Optional. HTTP or tg:// url to be opened when the button is pressed. Links tg://user?id=<user_id> can be used to mention a user by their ID without using a username, if this is allowed by their privacy settings. +Optional. HTTP or tg:// URL to be opened when the button is pressed. Links tg://user?id=<user_id> can be used to mention a user by their ID without using a username, if this is allowed by their privacy settings. callback_data @@ -2046,7 +2046,7 @@ To learn how to create…"> data String -Optional. Data associated with the callback button. Be aware that the message, which originated the query, can contain no callback buttons with this data. +Optional. Data associated with the callback button. Be aware that the message, from which originated the query, can contain no callback buttons with this data. game_short_name @@ -5699,7 +5699,7 @@ pre-formatted fixed-width code block written in the Python programming language

answerCallbackQuery

Use this method to send answers to callback queries sent from inline keyboards. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert. On success, True is returned.

-

Alternatively, the user can be redirected to the specified Game URL. For this option to work, you must first create a game for your bot via @Botfather and accept the terms. Otherwise, you may use links like t.me/your_bot?start=XXXX that open your bot with a parameter.

+

Alternatively, the user can be redirected to the specified Game URL. For this option to work, you must first create a game for your bot via @BotFather and accept the terms. Otherwise, you may use links like t.me/your_bot?start=XXXX that open your bot with a parameter.

@@ -5733,7 +5733,7 @@ pre-formatted fixed-width code block written in the Python programming language - + @@ -7108,7 +7108,7 @@ pre-formatted fixed-width code block written in the Python programming language - + @@ -8318,7 +8318,7 @@ pre-formatted fixed-width code block written in the Python programming language - + @@ -8348,12 +8348,12 @@ pre-formatted fixed-width code block written in the Python programming language - + - + @@ -8388,12 +8388,12 @@ pre-formatted fixed-width code block written in the Python programming language - + - + @@ -8440,7 +8440,7 @@ pre-formatted fixed-width code block written in the Python programming language
url String OptionalURL that will be opened by the user's client. If you have created a Game and accepted the conditions via @Botfather, specify the URL that opens your game — note that this will only work if the query comes from a callback_game button.

Otherwise, you may use links like t.me/your_bot?start=XXXX that open your bot with a parameter.
URL that will be opened by the user's client. If you have created a Game and accepted the conditions via @BotFather, specify the URL that opens your game — note that this will only work if the query comes from a callback_game button.

Otherwise, you may use links like t.me/your_bot?start=XXXX that open your bot with a parameter.
cache_time
mime_type StringMime type of the content of video url, “text/html” or “video/mp4”Mime type of the content of the video URL, “text/html” or “video/mp4”
thumb_url
provider_token StringPayment provider token, obtained via BotfatherPayment provider token, obtained via @BotFather
currency
photo_url StringOptional. URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. People like it better when they see what they are paying for.Optional. URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service.
photo_size IntegerOptional. Photo sizeOptional. Photo size in bytes
photo_width
send_phone_number_to_provider BooleanOptional. Pass True, if user's phone number should be sent to providerOptional. Pass True, if the user's phone number should be sent to provider
send_email_to_provider BooleanOptional. Pass True, if user's email address should be sent to providerOptional. Pass True, if the user's email address should be sent to provider
is_flexible
-

Note: It is necessary to enable inline feedback via @Botfather in order to receive these objects in updates.

+

Note: It is necessary to enable inline feedback via @BotFather in order to receive these objects in updates.

answerWebAppQuery

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. On success, a SentWebAppMessage object is returned.

@@ -8527,7 +8527,7 @@ pre-formatted fixed-width code block written in the Python programming language - + @@ -8563,7 +8563,7 @@ pre-formatted fixed-width code block written in the Python programming language - + @@ -8575,7 +8575,7 @@ pre-formatted fixed-width code block written in the Python programming language - + @@ -8617,13 +8617,13 @@ pre-formatted fixed-width code block written in the Python programming language - + - + @@ -9553,7 +9553,7 @@ pre-formatted fixed-width code block written in the Python programming language - +
provider_token String YesPayments provider token, obtained via BotfatherPayment provider token, obtained via @BotFather
currencyprovider_data String OptionalA JSON-serialized data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider.JSON-serialized data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider.
photo_urlphoto_size Integer OptionalPhoto sizePhoto size in bytes
photo_widthsend_phone_number_to_provider Boolean OptionalPass True, if user's phone number should be sent to providerPass True, if the user's phone number should be sent to provider
send_email_to_provider Boolean OptionalPass True, if user's email address should be sent to providerPass True, if the user's email address should be sent to provider
is_flexiblegame_short_name String YesShort name of the game, serves as the unique identifier for the game. Set up your games via Botfather.Short name of the game, serves as the unique identifier for the game. Set up your games via @BotFather.
disable_notification