【问题标题】:Wrong response from the webhook: 400 Bad Request来自 webhook 的错误响应:400 Bad Request
【发布时间】:2016-10-13 09:49:06
【问题描述】:

我最近尝试使用 webhook 从电报获取更新。我的程序在 getUpdates() 上正常工作。 但是当我设置 webhook 时,我得到了

“来自 webhook 的错误响应:400 Bad Request”

尝试通过 getWebhookInfo 方法检查 webhook 状态时出错。

这是我的代码: $telegram->commandsHandler(true) 当在 getUpdates mod 下面的代码中使用时,一切都很好。 $telegram->commandsHandler(false)

应该说我使用 https 并且我的 ssl 没问题。

这是 getWebhookInfo 对我的回答。

{
  "ok": true,
  "result": {
    "url": "https://telbit.ir/api/bot/<token>",
    "has_custom_certificate": false,
    "pending_update_count": 13,
    "last_error_date": 1476344420,
    "last_error_message": "Wrong response from the webhook: 400 Bad Request"
  }
}

【问题讨论】:

  • 您的服务器工作正常吗?服务器的答案总是 200 OK 吗?

标签: php telegram telegram-bot bad-request php-telegram-bot


【解决方案1】:

我找到了答案

一切都很好。由于我的框架而发生错误。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-11-10
    • 1970-01-01
    • 1970-01-01
    • 2021-03-27
    • 2012-01-18
    相关资源
    最近更新 更多