# The signature generated using v0:{WEBHOOK\_REQUEST\_HEADER\_X-ZM-REQUEST-TIMESTAMP\_VALUE}:{WEBHOOK\_REQUEST\_BODY} does not match the signature in the header

**URL:** <https://devforum.zoom.us/t/the-signature-generated-using-v0-webhook-request-header-x-zm-request-timestamp-value-webhook-request-body-does-not-match-the-signature-in-the-header/91900>\
**Category:** Video SDK\
**Tags:** webhooks, video-sdk\
**Created:** [July 17, 2023, 3:14am UTC](https://devforum.zoom.us/t/the-signature-generated-using-v0-webhook-request-header-x-zm-request-timestamp-value-webhook-request-body-does-not-match-the-signature-in-the-header/91900 "2023-07-17T03:14:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hicucu](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/hicucu/32/49094_2.png) [@hicucu](https://devforum.zoom.us/u/hicucu)\
**Post date:** [July 17, 2023, 3:14am UTC](https://devforum.zoom.us/t/the-signature-generated-using-v0-webhook-request-header-x-zm-request-timestamp-value-webhook-request-body-does-not-match-the-signature-in-the-header/91900/1 "2023-07-17T03:14:49Z")

</div>

video sdk : 1.8.0

The webhook is not functioning properly.  
The comparison between the x-zm-signature in the header and the body is not working.  
I see. It appears that accessing the request header using req.headers.get(“x-zm-signature”) instead of req.headers[“x-zm-signature”] prevents the value from becoming undefined.  
The body of the request has been changed to a ReadableStream.  
After reading the body as a ReadableStream, the values are different.  
The request body for the session.start event is documented as follows:

```auto
{
  "event": "session.started",
  "payload": {
    "account_id": "{ACCOUNT_ID}",
    "object": {
      "start_time": "2022-07-27T16:56:34Z",
      "id":"{SESSION_ID}"
    }
  },
  "event_ts": 1658940994914
}

```

I have confirmed that the session.start event has been updated to include session\_name, and session\_id.

```auto
{
  event: 'session.started',
  payload: {
    account_id: 
    object: {
      session_name: 
      start_time: 
      session_id: 
      id: 
    }
  },
  event_ts: 
}

```

Including or removing these elements doesn’t work.

The signature generated using v0:{WEBHOOK\_REQUEST\_HEADER\_X-ZM-REQUEST-TIMESTAMP\_VALUE}:{WEBHOOK\_REQUEST\_BODY} does not match the signature in the header.

---

<div class="post-metadata">

**Author:** ![elisa.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/elisa.zoom/32/47836_2.png) [@elisa.zoom](https://devforum.zoom.us/u/elisa.zoom)\
**Post date:** [July 17, 2023, 4:06pm UTC](https://devforum.zoom.us/t/the-signature-generated-using-v0-webhook-request-header-x-zm-request-timestamp-value-webhook-request-body-does-not-match-the-signature-in-the-header/91900/2 "2023-07-17T16:06:10Z")

</div>

Hi @hicucu  
Thanks for reaching out to us!  
Have you been able to take a look at our sample app?

> **[GitHub - zoom/webhook-sample: Receive Zoom webhooks.](https://github.com/zoom/webhook-sample)**
>
> Receive Zoom webhooks. Contribute to zoom/webhook-sample development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![uri.covarrubias](https://avatars.discourse-cdn.com/v4/letter/u/d2c977/32.png) [@uri.covarrubias](https://devforum.zoom.us/u/uri.covarrubias)\
**Post date:** [July 26, 2024, 12:02am UTC](https://devforum.zoom.us/t/the-signature-generated-using-v0-webhook-request-header-x-zm-request-timestamp-value-webhook-request-body-does-not-match-the-signature-in-the-header/91900/3 "2024-07-26T00:02:39Z")

</div>

A year later but if can help to someone to solve this issue..  
I tried create a hash signature using my secret token and request body but doesn’t matching. The problem is in message sctructure..

I had v0:1721951212:{“payload”: {“plainToken”: “8Ec3oqLtS-Gx6b-8Ocqnmw”}, “event\_ts”: 1721951212909, “event”: “endpoint.url\_validation”}

Just erase blank spaces and works! i got the correct signature hashed!  
Here an example using python:

* * *

import hashlib  
import hmac  
import os

def calculate\_hash(message, secret\_token):  
# Crear un hash HMAC-SHA256 usando el token secreto  
hmac\_hash = hmac.new(secret\_token.encode(), message.encode(), hashlib.sha256).hexdigest()  
return hmac\_hash

# Ejemplo de uso

message = ‘v0:1721951212:{“payload”: {“plainToken”: “8Ec3oqLtS-Gx6b-8Ocqnmw”}, “event\_ts”: 1721951212909, “event”: “endpoint.url\_validation”}’  
message = message.replace(" ", “”)  
print(f’Nuevo mensaje: {message}')  
secret\_token = “j4DYHnKOQ3eLL3LV2jq61Q”

hash\_for\_verify = calculate\_hash(message, secret\_token)  
print(f"HMAC-SHA256 hash para verificación: {hash\_for\_verify}")

# v0=dac804460ef74c28b2791bde507481eeb39943cc86016451c355fa0d1a7660b0

* * *
