1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-07-03 06:40:49 +00:00
tgbotapi/docs/dev.inmo.tgbotapi.requests.webhook/-set-webhook.md
2021-03-17 15:18:37 +00:00

3.6 KiB

//docs/dev.inmo.tgbotapi.requests.webhook/SetWebhook

SetWebhook

[common]
Content
fun SetWebhook(url: String, certificate: MultipartFile, ipAddress: String? = null, maxAllowedConnections: Int? = null, allowedUpdates: List<String>? = null, dropPendingUpdates: Boolean? = null): MultipartSetWebhookRequest
fun SetWebhook(url: String, certificate: FileId, ipAddress: String? = null, maxAllowedConnections: Int? = null, allowedUpdates: List<String>? = null, dropPendingUpdates: Boolean? = null): SetWebhook

[common]
Content
fun SetWebhook(url: String, certificate: InputFile, ipAddress: String? = null, maxAllowedConnections: Int? = null, allowedUpdates: List<String>? = null, dropPendingUpdates: Boolean? = null): SetWebhookRequest
fun SetWebhook(url: String, ipAddress: String? = null, maxAllowedConnections: Int? = null, allowedUpdates: List<String>? = null, dropPendingUpdates: Boolean? = null): SetWebhook
More info

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.

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/. Since nobody else knows your bot's token, you can be pretty sure it's us.