Skip to content

getWebhookInfo

获取当前 Webhook 的配置信息。

请求

POST /:token/getwebhookinfo

参数

无参数。

响应

成功时返回 WebhookInfo 对象,包含 urlhas_custom_certificatepending_update_count 等字段。

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
  }
}

错误码

错误码描述
400请求参数错误
401Token 无效
403无权限执行此操作