getWebhookInfo
获取当前 Webhook 的配置信息。
请求
POST /:token/getwebhookinfo
参数
无参数。
响应
成功时返回 WebhookInfo 对象,包含 url、has_custom_certificate、pending_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 | 请求参数错误 |
| 401 | Token 无效 |
| 403 | 无权限执行此操作 |
