Set a webhook
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.
setWebhook(url = NULL, certificate = NULL, max_connections = 40L, allowed_updates = NULL)
url |
HTTPS url to send updates to. Use an empty string to remove webhook integration. |
certificate |
(Optional). Upload your public key certificate so that the root certificate in use can be checked. See Telegram's self-signed guide for details. |
max_connections |
(Optional). Maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery, 1-100. Defaults to 40. Use lower values to limit the load on your bot's server, and higher values to increase your bot's throughput. |
allowed_updates |
(Optional). String or vector of strings with the
types of updates you want your bot to receive. For example, specify
Please note that this parameter doesn't affect updates created before the call to the get_updates, so unwanted updates may be received for a short period of time. |
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>
.
You can also use it's snake_case equivalent set_webhook
.
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.