# Recording.completed event fired twice

**URL:** <https://devforum.zoom.us/t/recording-completed-event-fired-twice/5205>\
**Category:** API and Webhooks\
**Created:** [July 26, 2019, 1:40pm UTC](https://devforum.zoom.us/t/recording-completed-event-fired-twice/5205 "2019-07-26T13:40:02Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![juchkov11](https://avatars.discourse-cdn.com/v4/letter/j/9de0a6/32.png) [@juchkov11](https://devforum.zoom.us/u/juchkov11)\
**Post date:** [July 26, 2019, 1:40pm UTC](https://devforum.zoom.us/t/recording-completed-event-fired-twice/5205/1 "2019-07-26T13:40:03Z")

</div>

Continuosly receiving “recording.completed” event twice for the same meeting. The delay between events is exactly 5mins.  
All other events has no such problems. And I’m pretty sure that my handler responses with 200 status code in less then 30seconds.  
Does anyone know where problem could be?

---

<div class="post-metadata">

**Author:** ![drosentrater](https://avatars.discourse-cdn.com/v4/letter/d/e0b2c6/32.png) [@drosentrater](https://devforum.zoom.us/u/drosentrater)\
**Post date:** [July 26, 2019, 2:55pm UTC](https://devforum.zoom.us/t/recording-completed-event-fired-twice/5205/2 "2019-07-26T14:55:55Z")

</div>

Yes, I’m getting the same thing! I had been running a lambda function on Netlify using this webhook and it had been working perfectly for weeks. The first time this issue started happening was on July 14 and the only thing I had changed in my codebase recently was adding an email address to a whitelist.

I switched my app over to a webhook-only app, because the version I had setup wasn’t giving me any Zoom logs. I started monitoring the Zoom call logs. I thought maybe the response wasn’t coming back fast enough from my function and so Zoom was firing off a retry request. But the logs show that the success response time is about 3-5 seconds, which seems like it should be fine.

The other odd thing is that the second webhook request always fires about 5 minutes after the first one. If it was a retry request, I would expect it to fire again immediately.

Is anyone else having this issue or does anyone have more ideas about what could be going on? I’m wondering if something changed in the Zoom codebase around this time to cause a bug.

---

<div class="post-metadata">

**Author:** ![drosentrater](https://avatars.discourse-cdn.com/v4/letter/d/e0b2c6/32.png) [@drosentrater](https://devforum.zoom.us/u/drosentrater)\
**Post date:** [July 26, 2019, 3:06pm UTC](https://devforum.zoom.us/t/recording-completed-event-fired-twice/5205/3 "2019-07-26T15:06:17Z")

</div>

After a little more looking into the logs, I think the second request actually is a retry request. I found this in the headers:

```
"X-Zoom-Retry-Reason": "hystrix time out",
"X-Zoom-Retry-Num": "1",
"x-zm-trackingid": null,

```

The thing I don’t understand is how I got a success response back in less than 5 seconds, but the function still timed out. I think I’m going to have to look into the Netlify side of things to debug this.

@juchkov11, are you using Netlify lambda as well? Just curious if we’re having the same issue or something different.

---

<div class="post-metadata">

**Author:** ![juchkov11](https://avatars.discourse-cdn.com/v4/letter/j/9de0a6/32.png) [@juchkov11](https://devforum.zoom.us/u/juchkov11)\
**Post date:** [July 26, 2019, 3:54pm UTC](https://devforum.zoom.us/t/recording-completed-event-fired-twice/5205/4 "2019-07-26T15:54:07Z")

</div>

Hi, no. In my case handler is running on dedicated server. So, I think problem is not depending on environment. I will try to respond with 204 status code and see how it goes.

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [July 26, 2019, 7:09pm UTC](https://devforum.zoom.us/t/recording-completed-event-fired-twice/5205/5 "2019-07-26T19:09:49Z")

</div>

Hey @juchkov11 and @drosentrater,

I’d suspect this might be a network issue that our end didn’t receive the ack, thus we sent it twice.

Can you direct message me with your account id and meeting id so I can look into this further?

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![juchkov11](https://avatars.discourse-cdn.com/v4/letter/j/9de0a6/32.png) [@juchkov11](https://devforum.zoom.us/u/juchkov11)\
**Post date:** [July 29, 2019, 5:55am UTC](https://devforum.zoom.us/t/recording-completed-event-fired-twice/5205/6 "2019-07-29T05:55:10Z")

</div>

Good morning, @tommy!  
It seems I have no privileges to send direct messages. (probably because I am new forum user). Could you please suggest another way to communicate?

---

<div class="post-metadata">

**Author:** ![drosentrater](https://avatars.discourse-cdn.com/v4/letter/d/e0b2c6/32.png) [@drosentrater](https://devforum.zoom.us/u/drosentrater)\
**Post date:** [July 29, 2019, 1:56pm UTC](https://devforum.zoom.us/t/recording-completed-event-fired-twice/5205/7 "2019-07-29T13:56:15Z")

</div>

@tommy I’m in the same boat. I don’t think I have spent enough time on the message board to be able to send direct messages yet. Perhaps you can message me? Otherwise, I’ll spend some more time on the forum until I get messaging privileges.

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [July 29, 2019, 3:03pm UTC](https://devforum.zoom.us/t/recording-completed-event-fired-twice/5205/8 "2019-07-29T15:03:56Z")

</div>

@drosentrater, @juchkov11,

Just private messaged both of you.

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [July 29, 2019, 8:36pm UTC](https://devforum.zoom.us/t/recording-completed-event-fired-twice/5205/9 "2019-07-29T20:36:34Z")

</div>

We’ve confirmed this was triggered by retry. However, we are still researching if feasible for us to further improve our current network error detection logic. For now, please disregard the 2nd callback message.

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [August 16, 2019, 8:39pm UTC](https://devforum.zoom.us/t/recording-completed-event-fired-twice/5205/10 "2019-08-16T20:39:16Z")

</div>

To fix this, try sending a 200 response back within a few seconds (1 second if possible). If Zoom does not get the 200 response, it initiates retry logic after 5 mins.

Here is an example of how to send a 200 response after receiving a webhook event in Node.js / Express

```auto
app.post('/webhook', async function (req, res) {
  // need to respond within 1 second with a 200 or else Zoom thinks webhook did not work and will retry.
  res.status(200)
  res.send()
  // your app logic here
})

```

[https://derickbailey.com/2016/03/14/properly-handling-webhooks-with-node-and-express/](https://derickbailey.com/2016/03/14/properly-handling-webhooks-with-node-and-express/)

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [August 23, 2019, 7:13pm UTC](https://devforum.zoom.us/t/recording-completed-event-fired-twice/5205/11 "2019-08-23T19:13:07Z")

</div>

We have updated our docs with how to respond to webhooks.

> **[Webhook Reference - API Reference](https://marketplace.zoom.us/docs/api-reference/webhook-reference#notification-delivery)**
>
> Webhooks
> 
> 
> 
> Zoom utilizes webhooks as a medium to notify third-party applications (consumer applications) about events that occur in a Zoom account. Ins...

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![laxman](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/laxman/32/7429_2.png) [@laxman](https://devforum.zoom.us/u/laxman)\
**Post date:** [May 7, 2020, 11:27am UTC](https://devforum.zoom.us/t/recording-completed-event-fired-twice/5205/12 "2020-05-07T11:27:50Z")

</div>

Hello @ tommy

I am using `recording.completed` event notification

I am able to download my recording video in postman with the help of download url and also able to download but not able to download from node js code

> var fs = require(‘fs’);  
> const https = require(‘https’);  
> var file = fs.createWriteStream(fileName);
> 
> ```
> var request = https.get("https://zoom.us/rec/webhook_download/65x8fuv-?access_token=ddfggg", 
> function (response) {
> console.log(response);
> response.pipe(file);
> file.once('close', function() {
> try {
> var stat = fs.statSync(fileName);
> console.log(stat);
> }
> catch (err) { console.log(err)}
> });
> }).on('error', function (err) {
> console.log("error", err);// Handle errors
> fs.unlink(fileName);
> reject(err);
> });
> 
> ```

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [May 12, 2020, 9:23pm UTC](https://devforum.zoom.us/t/recording-completed-event-fired-twice/5205/13 "2020-05-12T21:23:09Z")

</div>

Hey @laxman,

What is the error you are getting from the Node.js code.

It sounds like this could be an issue with your Node.js code, have you tried googling the error?

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![DeveloperBot](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/developerbot/32/12632_2.png) [@DeveloperBot](https://devforum.zoom.us/u/DeveloperBot)\
**Post date:** [August 21, 2020, 9:16pm UTC](https://devforum.zoom.us/t/recording-completed-event-fired-twice/5205/14 "2020-08-21T21:16:45Z")

</div>

Closed on August 21, 2020, 9:16pm UTC


