setWebhook | R Documentation |
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, ip_address = NULL, drop_pending_updates = FALSE, secret_token = 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. |
ip_address |
(Optional). The fixed IP address which will be used to send webhook requests instead of the IP address resolved through DNS. |
drop_pending_updates |
(Optional). Pass True to drop all pending updates. |
secret_token |
(Optional). A secret token to be sent in a header
|
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
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.