# I can't validate zoom webhook in php laravel

**URL:** <https://devforum.zoom.us/t/i-cant-validate-zoom-webhook-in-php-laravel/88807>\
**Category:** Meetings\
**Tags:** webhooks\
**Created:** [May 22, 2023, 2:24pm UTC](https://devforum.zoom.us/t/i-cant-validate-zoom-webhook-in-php-laravel/88807 "2023-05-22T14:24:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nicholasmt09](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/nicholasmt09/32/48621_2.png) [@nicholasmt09](https://devforum.zoom.us/u/nicholasmt09)\
**Post date:** [May 22, 2023, 2:24pm UTC](https://devforum.zoom.us/t/i-cant-validate-zoom-webhook-in-php-laravel/88807/1 "2023-05-22T14:24:45Z")

</div>

i’m trying to validate webook in php laravel but is not working at pls i need help

---

<div class="post-metadata">

**Author:** ![nicholasmt09](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/nicholasmt09/32/48621_2.png) [@nicholasmt09](https://devforum.zoom.us/u/nicholasmt09)\
**Post date:** [May 28, 2023, 12:04pm UTC](https://devforum.zoom.us/t/i-cant-validate-zoom-webhook-in-php-laravel/88807/2 "2023-05-28T12:04:34Z")

</div>

I actually figured it out my self, hope it will help others trying to verify signature and validate webhook endpoint url.  
Here is the code snippet:

```auto
        $message = 'v0:'.$request->header('x-zm-request-timestamp').':'.$request->getContent();
        $hash = hash_hmac('sha256', $message, 'Zoom_Secret_Token');
        $signature = "v0={$hash}";
        $verified = hash_equals($request->header('x-zm-signature'), $signature);
        if($verified)
        {
            $zoomData = json_decode($request->getContent(), true);
            $zoomSecret = 'Zoom_Secret_Token';  
            $zoomPlainToken = $zoomData['payload']['plainToken'];
            $hash = hash_hmac('sha256', $zoomPlainToken, $zoomSecret);
            $reponseData['plainToken'] = $zoomPlainToken;
            $reponseData['encryptedToken'] = $hash;
            return response()->json($reponseData);
       }

```

---

<div class="post-metadata">

**Author:** ![citrumsoft](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/citrumsoft/32/55578_2.png) [@citrumsoft](https://devforum.zoom.us/u/citrumsoft)\
**Post date:** [January 12, 2024, 12:40pm UTC](https://devforum.zoom.us/t/i-cant-validate-zoom-webhook-in-php-laravel/88807/3 "2024-01-12T12:40:06Z")

</div>

Thank you! this best solution!
