我正在尝试创建一个GotoWebinar网络钩子,但每次都会收到400个坏请求。
这是我的callBackUrl函数
Route::get('g2w/webhook', function(Request $request) {
return response()->json([
'success'=>true
],200);
});这是我向https://api.getgo.com/G2W/rest/v2/webhooks发布的web钩子创建请求
[
{
"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"
}谢谢你的帮助
发布于 2021-08-02 10:21:50
回调端点需要同时接受GET和POST请求。将‘g2w/web钩子’路由更改为:
Route:match(['get', 'post'], 'g2w/webhook', function(Request $request) {
return response()->json([
'success'=>true
],200);
});https://stackoverflow.com/questions/65509307
复制相似问题