# Verifying X-Hook-Signature on Asana Webhook

**URL:** <https://forum.asana.com/t/verifying-x-hook-signature-on-asana-webhook/82045>\
**Category:** API & Developers\
**Tags:** webhooks\
**Created:** [29 April 2020 22:15 UTC](https://forum.asana.com/t/verifying-x-hook-signature-on-asana-webhook/82045 "2020-04-29T22:15:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel\_Espinosa](https://luna1.co/8d76cd.png) [@Daniel\_Espinosa](https://forum.asana.com/u/Daniel_Espinosa)\
**Post date:** [29 April 2020 22:15 UTC](https://forum.asana.com/t/verifying-x-hook-signature-on-asana-webhook/82045/1 "2020-04-29T22:15:12Z")

</div>

So, I’m really confused about this optional but highly recommended step for receiving the Events in a registered Webhook target.

As far as I understand the X-Hook-Signature header is the precomputed hash of the data using the shared secret that was exchanged through the initial handshake to create the webhook. If this is correct, from what I understand all I need to do to verify the data is real and that it came from Asana is to use the secret key to compute a hash on the posted data using the HMACSHA256 algorithm and compare it to the X-Hook-Signature value.

However, the X-Hook-Signature header contains a 64 bytes hash, but ALL computed HMACSHA256 are 256 bits, or 32 bytes, so what is going on here? The length of the hashes is a complete mistmatch, so the comparison would always fail. Am I missing something here? Any help would be appreciated.

---

<div class="post-metadata">

**Author:** ![anon21389499](https://luna1.co/8d76cd.png) [@anon21389499](https://forum.asana.com/u/anon21389499)\
**Post date:** [20 May 2020 20:47 UTC](https://forum.asana.com/t/verifying-x-hook-signature-on-asana-webhook/82045/2 "2020-05-20T20:47:48Z")

</div>

Hey Daniel,

I’m having this exact question. Were you able to figure out what was happening?

---

<div class="post-metadata">

**Author:** ![Daniel\_Espinosa](https://luna1.co/8d76cd.png) [@Daniel\_Espinosa](https://forum.asana.com/u/Daniel_Espinosa)\
**Post date:** [21 May 2020 22:01 UTC](https://forum.asana.com/t/verifying-x-hook-signature-on-asana-webhook/82045/3 "2020-05-21T22:01:41Z")

</div>

Hey Oscar, I was never able to figure this out and no one replied here in the forums. Let me know if you find a solution!

---

<div class="post-metadata">

**Author:** ![Chris\_K](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/chris_k/32/63970_2.png) [@Chris\_K](https://forum.asana.com/u/Chris_K)\
**Post date:** [26 October 2020 09:28 UTC](https://forum.asana.com/t/verifying-x-hook-signature-on-asana-webhook/82045/4 "2020-10-26T09:28:42Z")

</div>

Slightly old post, but just wanted to chime in.

SHA256 is 64 characters long. SHA256 is always 256 bits long, equivalent to **32** bytes, or 64 bytes in an hexadecimal string format.

I use php function:

> hash\_hmac(‘sha256’, $requestBody, $secret)

Which returns 64 characters, which is how long the Asana signature is.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/system/32/276370_2.png) [@system](https://forum.asana.com/u/system)\
**Post date:** [30 May 2025 19:06 UTC](https://forum.asana.com/t/verifying-x-hook-signature-on-asana-webhook/82045/5 "2025-05-30T19:06:23Z")

</div>

Closed on 30 May 2025 19:06 UTC


