Gotowebinar webhook 创建 400 错误请求无效的 callbackUrl
Gotowebinar webhook creation 400 bad request Invalid callbackUrl
我正在尝试创建 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
感谢您的帮助
您的回调端点需要同时接受 GET 和 POST 请求。将 'g2w/webhook' 路由更改为:
Route:match(['get', 'post'], 'g2w/webhook', function(Request $request) {
return response()->json([
'success'=>true
],200);
});
我正在尝试创建 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
[
{
"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
感谢您的帮助
您的回调端点需要同时接受 GET 和 POST 请求。将 'g2w/webhook' 路由更改为:
Route:match(['get', 'post'], 'g2w/webhook', function(Request $request) {
return response()->json([
'success'=>true
],200);
});