# Validation fails even though response is correct

**URL:** <https://devforum.zoom.us/t/validation-fails-even-though-response-is-correct/120935>\
**Category:** API and Webhooks\
**Created:** [November 14, 2024, 5:02pm UTC](https://devforum.zoom.us/t/validation-fails-even-though-response-is-correct/120935 "2024-11-14T17:02:50Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![iSkeat](https://avatars.discourse-cdn.com/v4/letter/i/65b543/32.png) [@iSkeat](https://devforum.zoom.us/u/iSkeat)\
**Post date:** [November 14, 2024, 5:02pm UTC](https://devforum.zoom.us/t/validation-fails-even-though-response-is-correct/120935/1 "2024-11-14T17:02:50Z")

</div>

POST /api/v2/Website/zoom/verify

**Description**  
My app Medspa Network is failing its validation for webhooks, i have copied the code directly from the Zoom example for Node and modified to it fit my Token. i can verify through PostMan that the API is working correctly and sending the correct data back in less than .3 seconds. I have also regenerated my token to ensure that it is up to date, and Verified that my ENV variabales are live and correct.

```auto
const hashForValidate = crypto.createHmac('sha256', process.env.ZOOM_WEBHOOK_SECRET_TOKEN).update(request.body.payload.plainToken).digest('hex')

  response.status(200)
  response.json({
    "plainToken": request.body.payload.plainToken,
    "encryptedToken": hashForValidate
  })

```

**Error?**  
Validation Failed

**How To Reproduce**

1. Send a POST to my endpoint medspanetwork[.com] /api/v2/Website/zoom/verify
2. Obviously my token wont match the one you send, but you should still get a correctly formatted JSON response

---

<div class="post-metadata">

**Author:** ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)\
**Post date:** [November 18, 2024, 4:20am UTC](https://devforum.zoom.us/t/validation-fails-even-though-response-is-correct/120935/2 "2024-11-18T04:20:34Z")

</div>

@iSkeat you need to send status 200 together with the payload. it seems you are just sending status 200 by itself as the first response.

something like this might work

```auto
res.status(200).json({
      "plainToken": req.body.payload.plainToken,
      "encryptedToken": hashForValidate
    });

```

---

<div class="post-metadata">

**Author:** ![iSkeat](https://avatars.discourse-cdn.com/v4/letter/i/65b543/32.png) [@iSkeat](https://devforum.zoom.us/u/iSkeat)\
**Post date:** [November 18, 2024, 2:19pm UTC](https://devforum.zoom.us/t/validation-fails-even-though-response-is-correct/120935/3 "2024-11-18T14:19:57Z")

</div>

Hi Chun,  
Unfortunately thats not quite how Node and Express work.  
Setting the status before the response data is valid. However, i did try your suggestion as well. It still did not validate.

---

<div class="post-metadata">

**Author:** ![iSkeat](https://avatars.discourse-cdn.com/v4/letter/i/65b543/32.png) [@iSkeat](https://devforum.zoom.us/u/iSkeat)\
**Post date:** [November 18, 2024, 3:05pm UTC](https://devforum.zoom.us/t/validation-fails-even-though-response-is-correct/120935/4 "2024-11-18T15:05:10Z")

</div>

HI there has been a new development!  
Using NGROK and the SAME EXACT CODE the verification passed.  
I am now wondering if it is an AWS ec2 issue… or CENTOS issue

---

<div class="post-metadata">

**Author:** ![iSkeat](https://avatars.discourse-cdn.com/v4/letter/i/65b543/32.png) [@iSkeat](https://devforum.zoom.us/u/iSkeat)\
**Post date:** [November 18, 2024, 5:04pm UTC](https://devforum.zoom.us/t/validation-fails-even-though-response-is-correct/120935/5 "2024-11-18T17:04:42Z")

</div>

Restarted NGINX and now everything works… idk

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [November 22, 2025, 8:41am UTC](https://devforum.zoom.us/t/validation-fails-even-though-response-is-correct/120935/6 "2025-11-22T08:41:02Z")

</div>

Closed on November 22, 2025, 8:41am UTC

This topic was automatically closed 368 days after the last reply. New replies are no longer allowed.
