SetWebhookRequest

data class SetWebhookRequest(url: String, certificate: String?, ipAddress: String?, maxConnections: Int?, allowedUpdates: List<String>, dropPendingUpdates: Boolean)

Request body for setWebhook

Parameters

url

HTTPS url to send updates to. Use an empty string to remove webhook integration

certificate

Upload your public key certificate so that the root certificate in use can be checked. See our self-signed guide for details.

ipAddress

The fixed IP address which will be used to send webhook requests instead of the IP address resolved through DNS

maxConnections

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.

allowedUpdates

A JSON-serialized list of the update types you want your bot to receive. For example, specify “message”, “edited_channel_post”, “callback_query” to only receive updates of these types. See Update for a complete list of available update types. Specify an empty list to receive all updates regardless of type (default). If not specified, the previous setting will be used. Please note that this parameter doesn't affect updates created before the call to the setWebhook, so unwanted updates may be received for a short period of time.

dropPendingUpdates

Pass True to drop all pending updates

Constructors

SetWebhookRequest
Link copied to clipboard
common
fun SetWebhookRequest(url: String, certificate: String? = null, ipAddress: String? = null, maxConnections: Int? = null, allowedUpdates: List<String> = emptyList(), dropPendingUpdates: Boolean = false)
HTTPS url to send updates to.

Functions

component1
Link copied to clipboard
common
operator fun component1(): String
component2
Link copied to clipboard
common
operator fun component2(): String?
component3
Link copied to clipboard
common
operator fun component3(): String?
component4
Link copied to clipboard
common
operator fun component4(): Int?
component5
Link copied to clipboard
common
operator fun component5(): List<String>
component6
Link copied to clipboard
common
operator fun component6(): Boolean
copy
Link copied to clipboard
common
fun copy(url: String, certificate: String? = null, ipAddress: String? = null, maxConnections: Int? = null, allowedUpdates: List<String> = emptyList(), dropPendingUpdates: Boolean = false): SetWebhookRequest
equals
Link copied to clipboard
common
open operator override fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
common
open override fun hashCode(): Int
toString
Link copied to clipboard
common
open override fun toString(): String

Properties

allowedUpdates
Link copied to clipboard
common
val allowedUpdates: List<String>
A JSON-serialized list of the update types you want your bot to receive.
certificate
Link copied to clipboard
common
val certificate: String? = null
Upload your public key certificate so that the root certificate in use can be checked.
dropPendingUpdates
Link copied to clipboard
common
val dropPendingUpdates: Boolean = false
Pass True to drop all pending updates
ipAddress
Link copied to clipboard
common
val ipAddress: String? = null
The fixed IP address which will be used to send webhook requests instead of the IP address resolved through DNS
maxConnections
Link copied to clipboard
common
val maxConnections: Int? = null
Maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery, 1-100.
url
Link copied to clipboard
common
val url: String
HTTPS url to send updates to.