# Race condition when meeting successively ended and deleted

**URL:** <https://devforum.zoom.us/t/race-condition-when-meeting-successively-ended-and-deleted/2940>\
**Category:** API and Webhooks\
**Created:** [January 10, 2019, 2:00pm UTC](https://devforum.zoom.us/t/race-condition-when-meeting-successively-ended-and-deleted/2940 "2019-01-10T14:00:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![anton](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/anton/32/1558_2.png) [@anton](https://devforum.zoom.us/u/anton)\
**Post date:** [January 10, 2019, 2:00pm UTC](https://devforum.zoom.us/t/race-condition-when-meeting-successively-ended-and-deleted/2940/1 "2019-01-10T14:00:52Z")

</div>

Hi there!

I’m trying to implement following scenario:

1. Zoom meeting created by my server for specific host and meeting link sent to participants, participants should join meeting without host (“join before host” option enabled).
2. After some time (~1 hour) all users should be kicked and not able to rejoin this session, host should be able to host other meetings.

So far, i implemented it in a following way:

1. Server creates meeting by calling `POST /v2/users/HOST_ID/meetings` with following body:

```auto
{
	"start_time": "2019-01-08T15:00:00+03:00", // or any other time
	"settings": {
		"join_before_host": true
	}
}

```

1. After some time (~1h) server updates meeting status by calling `PUT v2/meetings/:meetingId/status` with following body:

```auto
{
	"action": "end"
}

```

which should kick users from meeting  
3. Then server immediately calls `DELETE v2/meetings/:meetingId`, which should make meeting unjoinable.

Right now this scenario sometimes fails, because on the step 3 i receive status code 400 and error message saying that meeting is in `in-progress` state and can’t be deleted. For me it looks like some sort of race condition, is there any way to achieve desired scenario without timing hacks around step 3?

---

<div class="post-metadata">

**Author:** ![michael\_p.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_p.zoom/32/18105_2.png) [@michael\_p.zoom](https://devforum.zoom.us/u/michael_p.zoom)\
**Post date:** [January 17, 2019, 10:26pm UTC](https://devforum.zoom.us/t/race-condition-when-meeting-successively-ended-and-deleted/2940/2 "2019-01-17T22:26:39Z")

</div>

Hi @anton

Our server takes a couple minutes to update the meeting from in-progress to end. Right now the workaround would be to wait a couple minutes before deleting the meeting.

Thanks

---

<div class="post-metadata">

**Author:** ![nat](https://avatars.discourse-cdn.com/v4/letter/n/8c91f0/32.png) [@nat](https://devforum.zoom.us/u/nat)\
**Post date:** [May 7, 2020, 7:21pm UTC](https://devforum.zoom.us/t/race-condition-when-meeting-successively-ended-and-deleted/2940/3 "2020-05-07T19:21:22Z")

</div>

Hi Michael,  
I’m running into this exact issue (changing the status to end, then immediately attempting to delete the meeting). However, I don’t find your workaround to be an adequate solution because users are still able to log back into the meeting after it was ‘ended’. There needs to be a way to permanently prevent people from getting back into the meeting. Perhaps, a single API endpoint that boots everyone and deletes the meeting. Or better yet, a setting on the meeting that only allows people access to join during the meeting’s scheduled time. Thanks.

---

<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:17pm UTC](https://devforum.zoom.us/t/race-condition-when-meeting-successively-ended-and-deleted/2940/4 "2020-05-12T21:17:05Z")

</div>

Hey @nat,

Users should not be able to join the meeting once it has ended if you have the join before host setting turned off.

> **[Join Before Host](https://support.zoom.us/hc/en-us/articles/202828525-Join-Before-Host)**
>
> Overview
> Join before host allows attendees to join the meeting before the host joins or when the host cannot attend the meeting.
> If you select join before host, then the participants can join the m...

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/race-condition-when-meeting-successively-ended-and-deleted/2940/5 "2020-08-21T21:16:42Z")

</div>

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


