【问题标题】:Gotowebinar webhook creation 400 bad request Invalid callbackUrlGotowebinar webhook 创建 400 错误请求 Invalid callbackUrl
【发布时间】:2021-04-07 02:17:54
【问题描述】:

我正在尝试创建一个 GotoWebinar webhook,但每次都会收到 400 个错误请求

这是我的 callBackUrl 函数

Route::get('g2w/webhook', function(Request $request) {
  return response()->json([
        'success'=>true
  ],200);
});

这是我发给https://api.getgo.com/G2W/rest/v2/webhooks的post webhook创建请求

[
    {
     "callbackUrl":"https://website.com/g2w/webhook/",
     "eventName":"webinar.created",
     "eventVersion":"1.0.0",
     "product":"g2w"
    }
]

我总是得到这个错误

{
    "timestamp": 1609341614915,
    "status": 400,
    "error": "Bad Request",
    "exception": "com.logmein.webhooks.exceptions.InvalidRequestException",
    "message": "Invalid callbackUrl. callbackUrl not returning 200 OK as response. Please retry after sometime",
    "path": "/v1/webhooks"
}

GotoWebinar webhooks documentation

感谢您的帮助

【问题讨论】:

    标签: postman webhooks logmein


    【解决方案1】:

    您的回调端点需要同时接受 GET 和 POST 请求。将“g2w/webhook”路由更改为:

    Route:match(['get', 'post'], 'g2w/webhook', function(Request $request) {
      return response()->json([
            'success'=>true
      ],200);
    });
    

    【讨论】:

      猜你喜欢
      • 2016-09-17
      • 1970-01-01
      • 2019-06-15
      • 1970-01-01
      • 2015-12-18
      • 2023-02-09
      • 1970-01-01
      • 2018-10-19
      • 2022-01-18
      相关资源
      最近更新 更多