Package dev.inmo.tgbotapi.requests.webhook

Types

DeleteWebhook
Link copied to clipboard
common
class DeleteWebhook : SimpleRequest<Boolean>
GetWebhookInfo
Link copied to clipboard
common
class GetWebhookInfo : SimpleRequest<WebhookInfo>
MultipartSetWebhookRequest
Link copied to clipboard
common
class MultipartSetWebhookRequest(url: String, certificate: MultipartFile, ipAddress: String?, maxAllowedConnections: Int?, allowedUpdates: List<String>?, dropPendingUpdates: Boolean?) : SetWebhookRequest, MultipartRequest<Boolean>
SetWebhook
Link copied to clipboard

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

common
data class SetWebhook : SetWebhookRequest, DataRequest<Boolean>
SetWebhookRequest
Link copied to clipboard
common
sealed class SetWebhookRequest : Request<Boolean>

Functions

SetWebhook
Link copied to clipboard

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

common
fun SetWebhook(url: String, ipAddress: String?, maxAllowedConnections: Int?, allowedUpdates: List<String>?, dropPendingUpdates: Boolean?): SetWebhook
fun SetWebhook(url: String, certificate: InputFile, ipAddress: String?, maxAllowedConnections: Int?, allowedUpdates: List<String>?, dropPendingUpdates: Boolean?): SetWebhookRequest
common
fun SetWebhook(url: String, certificate: FileId, ipAddress: String?, maxAllowedConnections: Int?, allowedUpdates: List<String>?, dropPendingUpdates: Boolean?): SetWebhook
fun SetWebhook(url: String, certificate: MultipartFile, ipAddress: String?, maxAllowedConnections: Int?, allowedUpdates: List<String>?, dropPendingUpdates: Boolean?): MultipartSetWebhookRequest