Facing issue while Validating WebHook to my URL in PHP

My backend the PHP and I have added a logic to implement webhook with my URL. But webhook is not able to validate.

Below is my code. Here I have hide my secret. My both the variables are matching encryptedToken and ZoomSignature. Please guide me further.

$secret = “This is removed for security purpose”;
$data = file_get_contents(“php://input”);
$webinar_array = json_decode($data);
// $GLOBALS[‘log’]->fatal(“webinar_array=”.print_r($webinar_array,1));
$string = $webinar_array->payload->plainToken;

$message = "v0:".$timestamp.":".$data;

$encryptedToken = hash_hmac('sha256', $message, $secret);
$encryptedToken = "v0=".$encryptedToken;	

$ZoomSignature = $_SERVER['HTTP_X_ZM_SIGNATURE'];
// $GLOBALS['log']->fatal("server=".print_r($_SERVER,1));	
// Response HTTP status code when:
//   200: Correctly signed payload
//   401: Incorrectly signed payload	
// if (hash_equals($encryptedToken, $ZoomSignature)) {
if ($encryptedToken == $ZoomSignature) {	       
} else {
return true;


Hi @sam6
Thanks for reaching out to the Zoom Developer Forum and welcome to our community!
Sorry for the late reply here! I just wanted to check in with you to see if you were able to troubleshoot this on your end or if you need some assistance here!