SetWebhookApi
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 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.
Notes
You will not be able to receive updates using getUpdates for as long as an outgoing webhook is set up.
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.
Ports currently supported for webhooks: 443, 80, 88, 8443.
If you're having any trouble setting up webhooks, please check out this amazing guide to webhooks.
Author
ForteScarlet
Types
Request body of SetWebhookApi.
Properties
The request body (or null).
The result's DeserializationStrategy of this Method.
The TelegramApiResult's DeserializationStrategy of this Method.
Inherited properties
MultiPartFormDataContent does not require a serializer. Always get null
.
Headers for request. Default is Headers.Empty.
Inherited functions
Request the TelegramApi by client with token.
Request the TelegramApi by client with token.
Request the TelegramApi by client with token.