# Validating Whatsapp Webhooks

**URL:** <https://forum.bubble.io/t/validating-whatsapp-webhooks/245380>\
**Category:** APIs\
**Created:** [February 6, 2023, 12:10am UTC](https://forum.bubble.io/t/validating-whatsapp-webhooks/245380 "2023-02-06T00:10:57Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![pachocastillosr](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/pachocastillosr/32/154570_2.png) [@pachocastillosr](https://forum.bubble.io/u/pachocastillosr)\
**Post date:** [February 6, 2023, 12:10am UTC](https://forum.bubble.io/t/validating-whatsapp-webhooks/245380/1 "2023-02-06T00:10:57Z")

</div>

Hi,

In order to validate Whatsapp webhooks I need to get, from the webhook’s json, this header that contains a signature:

 ![vp](https://us1.discourse-cdn.com/bubble/original/3X/d/2/d2bab555f80e510205f1626f833d30564822efb0.png)

**The problem is** that this endpoint couldn’t be initialized by auto detecting its parameters (including the desired header) because Meta required to return a code that they sent in the first webhook (reading this you can understand better:

> [@Verifying the Endpoint for WhatsApp Webhooks](http://forum.bubble.io/t/verifying-the-endpoint-for-whatsapp-webhooks/239045/6):
>
> For anybody looking to do this, in the end, this is what worked: [verifytoken12] Thanks for the guidance @NigelG The final objective is to configure Whatsapp Webhooks and save the content of a Whatsapp message into our Bubble database. Trying to solve the next challenge in this process here: [Saving data from json Whatsapp Webhooks into Bubble's database](http://forum.bubble.io/t/getting-data-from-whatsapp-webhooks-into-bubbles-database-cant-use-auto-detect/239080)

)

In conclusion, the header was not and, apparently, cannot be auto detected by auto initializing the endpoint so I don’t know how to get that string (the signature).

Any suggestions on how to get that header’s string?

---

<div class="post-metadata">

**Author:** ![jonah.deleseleuc](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jonah.deleseleuc/32/199133_2.png) [@jonah.deleseleuc](https://forum.bubble.io/u/jonah.deleseleuc)\
**Post date:** [February 6, 2023, 12:19am UTC](https://forum.bubble.io/t/validating-whatsapp-webhooks/245380/2 "2023-02-06T00:19:54Z")

</div>

I’m not sure I understand the roadblock you’re facing. From what I can understand, you already know that the verification header will look like, right?

If that’s the case, you can manually edit the json request data to include that header. If they only need you to return that value to initialize your webhook, just return it. After that you can initialize your endpoint again.

Let me know if I’m not understanding this correctly

---

<div class="post-metadata">

**Author:** ![jonah.deleseleuc](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jonah.deleseleuc/32/199133_2.png) [@jonah.deleseleuc](https://forum.bubble.io/u/jonah.deleseleuc)\
**Post date:** [February 6, 2023, 7:35am UTC](https://forum.bubble.io/t/validating-whatsapp-webhooks/245380/4 "2023-02-06T07:35:46Z")

</div>

That’s strange, but I guess I understand. Since there are no workflows running during the autodetect process, then it makes sense.

Instead of using postman, I think you could skip auto detect and just have one workflow action that returns the sha 256 value. You do this by manually recreating the JSON in the request data section, and make sure to recreate the header. I don’t think you need to recreate the whole call, just make sure a body and header exists and that the header is in the correct place.

Then, what you do is have meta send the request and you return the value. Okay, now Meta should be okay with the value you give it. (Note: Meta might want the value INSIDE the sha246={long thing here}. In this case, you’re going to need to use a plug-in or some custom js)

Now, click auto detect data ( note we returned the value of the sha256 code in the previous step, now we are gonna do the real thing). The next time Meta sends a request you will get the real structure of the call!

---

<div class="post-metadata">

**Author:** ![pachocastillosr](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/pachocastillosr/32/154570_2.png) [@pachocastillosr](https://forum.bubble.io/u/pachocastillosr)\
**Post date:** [February 6, 2023, 3:49pm UTC](https://forum.bubble.io/t/validating-whatsapp-webhooks/245380/5 "2023-02-06T15:49:58Z")

</div>

Thanks for your help @jonah.deleseleuc! In the end, this ended up working:

> [@pachocastillosr](#):
>
> I tried adding this by manually editing the json request data:
> 
> ![hddl](https://us1.discourse-cdn.com/bubble/original/3X/2/8/282f549f38257b92b2496c6d56eaa2bea2ae7b37.png)

---

<div class="post-metadata">

**Author:** ![jonah.deleseleuc](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jonah.deleseleuc/32/199133_2.png) [@jonah.deleseleuc](https://forum.bubble.io/u/jonah.deleseleuc)\
**Post date:** [February 6, 2023, 5:15pm UTC](https://forum.bubble.io/t/validating-whatsapp-webhooks/245380/6 "2023-02-06T17:15:54Z")

</div>

Yup, that’s what I meant

---

<div class="post-metadata">

**Author:** ![pachocastillosr](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/pachocastillosr/32/154570_2.png) [@pachocastillosr](https://forum.bubble.io/u/pachocastillosr)\
**Post date:** [February 6, 2023, 5:48pm UTC](https://forum.bubble.io/t/validating-whatsapp-webhooks/245380/7 "2023-02-06T17:48:55Z")

</div>

I was wondering if you have any idea about how to do the next step, which is [Escaping a string to unicode lowercase hex digits](http://forum.bubble.io/t/escaping-a-string-to-unicode-lowercase-hex-digits/245518). Please let me know, if possible, thanks!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/bubble/original/3X/2/8/2847faa74692c2ffa5d939d3dc3724cdd060d247.png) [@system](https://forum.bubble.io/u/system)\
**Post date:** [April 17, 2023, 12:11am UTC](https://forum.bubble.io/t/validating-whatsapp-webhooks/245380/8 "2023-04-17T00:11:38Z")

</div>

Closed on April 17, 2023, 12:11am UTC

This topic was automatically closed after 70 days. New replies are no longer allowed.
