Skip to content

getWebhookInfo

Get the current webhook configuration information. No parameters are required.

Request

POST /:token/getwebhookinfo

Parameters

No parameters.

Response

Returns a WebhookInfo object containing fields such as url, has_custom_certificate, pending_update_count, and more.

json
{
  "ok": true,
  "result": {
    "url": "https://example.com/webhook",
    "has_custom_certificate": false,
    "pending_update_count": 0,
    "ip_address": "1.2.3.4",
    "max_connections": 40,
    "allowed_updates": ["message", "callback_query"],
    "last_error_date": null,
    "last_error_message": null
  }
}

Error Codes

CodeDescription
400Bad request parameters
401Invalid token
403Bot does not have permission to perform this action