I am using following Laravel code to check webhook validation. But I unable to validate it, everytime it’s showing “URL validation failed. Try again later.”
if ($request->event === ‘endpoint.url_validation’) {
$hashForValidate = hash_hmac(‘sha256’, $request->payload[‘plainToken’], env(‘ZOOM_WEBHOOK_SECRET_TOKEN’));
$response = [
'message' => [
'plainToken' => $request->payload['plainToken'],
'encryptedToken' => $hashForValidate,
],
'status' => 200,
];
logger()->info($response['message']);
return response()->json($response['message'], $response['status']);
}