# Webhook Validation for Emojis

**URL:** <https://community.hubspot.com/t/webhook-validation-for-emojis/101194>\
**Category:** APIs & Integrations\
**Tags:** webhooks\
**Created:** [February 27, 2024, 1:43pm UTC](https://community.hubspot.com/t/webhook-validation-for-emojis/101194 "2024-02-27T13:43:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![EFiori](https://avatars.discourse-cdn.com/v4/letter/e/bbe5ce/32.png) [@EFiori](https://community.hubspot.com/u/EFiori)\
**Post date:** [February 27, 2024, 1:43pm UTC](https://community.hubspot.com/t/webhook-validation-for-emojis/101194/1 "2024-02-27T13:43:55Z")

</div>

Has anyone sucessfully validated an incoming request where the body included emoji text? I’m following the v3 of this guide ([Webhooks | Validating Requests - HubSpot docs](https://developers.hubspot.com/docs/api/webhooks/validating-requests)) and have not had a problem until now (multiple months in production)

Thanks

---

<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:** [February 28, 2024, 12:04am UTC](https://community.hubspot.com/t/webhook-validation-for-emojis/101194/2 "2024-02-28T00:04:32Z")

</div>

Hi, @EFiori 👋 I am with you, the documentation doesn’t give us much to work with for this specific issue. Do you have access to support? If so, it might be worth filing a support ticket to get clarity.

Hey, @JBeatty @louischausse, can you add anything here?

Thank you! — Jaycee

---

<div class="post-metadata">

**Author:** ![EFiori](https://avatars.discourse-cdn.com/v4/letter/e/bbe5ce/32.png) [@EFiori](https://community.hubspot.com/u/EFiori)\
**Post date:** [February 28, 2024, 1:42pm UTC](https://community.hubspot.com/t/webhook-validation-for-emojis/101194/3 "2024-02-28T13:42:38Z")

</div>

I have submitted a support ticket, hopefully they can assist.

Thanks

---

<div class="post-metadata">

**Author:** ![EFiori](https://avatars.discourse-cdn.com/v4/letter/e/bbe5ce/32.png) [@EFiori](https://community.hubspot.com/u/EFiori)\
**Post date:** [February 29, 2024, 10:16pm UTC](https://community.hubspot.com/t/webhook-validation-for-emojis/101194/4 "2024-02-29T22:16:59Z")

</div>

For those using expressjs and bodyParser.json() you may need to make the raw body available as a buffer to your validation code. I was able to do this with:

```lia-code-sample
app.use(bodyParser.json({
	verify: function(req, res, buf, encoding) {
		(req as any).rawBuffer = buf;
	}
}));

```

The in my middleware I created the computed signature as described in the docs, passing that buffer into the update method as requestBody:

```lia-code-sample
	const computedSignature = crypto.createHmac('sha256', CLIENT_SECRET)
		.update("POST" + WEBHOOK_URI)
		.update(requestBody)
		.update(timestamp)
		.digest("base64");

```

This computed signature now matches the provided signature (that’s in the header) for webhooks with or without emojis in the request body.

---

<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:** [February 29, 2024, 10:29pm UTC](https://community.hubspot.com/t/webhook-validation-for-emojis/101194/5 "2024-02-29T22:29:47Z")

</div>

Hey, @EFiori Thank you very much for coming back and sharing your solution! — Jaycee
