# App Webhook Validating (V1) Request Problems

**URL:** <https://community.hubspot.com/t/app-webhook-validating-v1-request-problems/82424>\
**Category:** CMS Development\
**Tags:** local-development, javascript\
**Created:** [June 1, 2023, 7:32am UTC](https://community.hubspot.com/t/app-webhook-validating-v1-request-problems/82424 "2023-06-01T07:32:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![FGamer](https://avatars.discourse-cdn.com/v4/letter/f/53a042/32.png) [@FGamer](https://community.hubspot.com/u/FGamer)\
**Post date:** [June 1, 2023, 7:32am UTC](https://community.hubspot.com/t/app-webhook-validating-v1-request-problems/82424/1 "2023-06-01T07:32:45Z")

</div>

Hi all,

I want to validate a webhook request from apublic app I created. I followed [this documentation](https://developers.hubspot.com/docs/api/webhooks/validating-requests) for the v1 validating. Using the data from the example, I receive the same hash as in the docu. However, creating the hash in my function that receives the request, I get a totally different hash. I wonder if I combine the string to hash incorrectly but cannot find any more details on that. If anyone could point out my mistake, I would be very grateful!  
I use the following code:

```lia-code-sample
const serviceBusTopicTrigger: AzureFunction = async function (context: Context, hubspotEvent: HttpRequest): Promise<void> {
 const clientSecret = 'yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy';
 const body = JSON.stringify(hubspotEvent.body);

 const strToHash = clientSecret + body;

 const hash1 = crypto.createHash('sha256').update(strToHash).digest('hex');

};

```

Thanks a lot!

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [June 1, 2023, 10:45pm UTC](https://community.hubspot.com/t/app-webhook-validating-v1-request-problems/82424/2 "2023-06-01T22:45:37Z")

</div>

Hi, @FGamer 👋 Thank you for including your code example in your post. It’s always helpful to see what you’re working with.

I don’t know the answer to this one, but some of our community members might — hey @Teun @Anton @BarryGrennan do you know if the use of

`const body = JSON.stringify(hubspotEvent.body);`

might be the issue? Is this changing order of the keys in the JSON payload? Giving a different string, and therefore a different hash? Should they try accessing the raw body payload directly? Other thoughts?

Thank you for taking a look! — Jaycee

---

<div class="post-metadata">

**Author:** ![FGamer](https://avatars.discourse-cdn.com/v4/letter/f/53a042/32.png) [@FGamer](https://community.hubspot.com/u/FGamer)\
**Post date:** [June 5, 2023, 7:51am UTC](https://community.hubspot.com/t/app-webhook-validating-v1-request-problems/82424/3 "2023-06-05T07:51:48Z")

</div>

Hi Jaycee,

without having changed anything, the code now works. As I was also in contact with the hubspot customer service, who escalated the problem to the Hubspot developer team, I suspect they actually fixed this. Nevertheless, thanks for your reply!

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [June 6, 2023, 5:53pm UTC](https://community.hubspot.com/t/app-webhook-validating-v1-request-problems/82424/4 "2023-06-06T17:53:28Z")

</div>

Hey hey, @FGamer 👋 Thank you very much for taking the time to follow up. I’m glad to hear this is now resolved.

Have a fantastic week! — Jaycee
