# How to end zoom meeting automatically?

**URL:** <https://devforum.zoom.us/t/how-to-end-zoom-meeting-automatically/798>\
**Category:** API and Webhooks\
**Created:** [November 23, 2017, 12:47pm UTC](https://devforum.zoom.us/t/how-to-end-zoom-meeting-automatically/798 "2017-11-23T12:47:38Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![S\_F](https://avatars.discourse-cdn.com/v4/letter/s/eb9ed0/32.png) [@S\_F](https://devforum.zoom.us/u/S_F)\
**Post date:** [November 23, 2017, 12:47pm UTC](https://devforum.zoom.us/t/how-to-end-zoom-meeting-automatically/798/1 "2017-11-23T12:47:38Z")

</div>

Hello Everyone,

In my application there is a requirement to end meetings automatically after specified duration is passed. While creating a meeting I am passing meeting duration in the code. But still meetings are not ending automatically even when duration is passed.

I am using zoom rest api function for creating a meeting with below parameters:

function createAMeeting(){  
$createAMeetingArray = array();  
$createAMeetingArray[‘host\_id’] = “Host ID”;  
$createAMeetingArray[‘topic’] = “Meeting Topic”;  
$createAMeetingArray[‘start\_time’] = “Meeting Start Time”;  
$createAMeetingArray[‘duration’] = “Meeting Duration”;  
$createAMeetingArray[‘type’] = “8”;  
return $this-\>sendRequest(‘meeting/create’, $createAMeetingArray);  
}

Meeting type I am using is ‘8’ which is ‘Recurring Meeting with fixed time’ as per the documentation.

&nbsp;

---

<div class="post-metadata">

**Author:** ![S\_F](https://avatars.discourse-cdn.com/v4/letter/s/eb9ed0/32.png) [@S\_F](https://devforum.zoom.us/u/S_F)\
**Post date:** [November 23, 2017, 1:10pm UTC](https://devforum.zoom.us/t/how-to-end-zoom-meeting-automatically/798/2 "2017-11-23T13:10:10Z")

</div>

There is one zoom rest api function I have found to end a meeting:

**function endAMeeting(){**  
**&nbsp; &nbsp; $endAMeetingArray = array();**  
**&nbsp; &nbsp; $endAMeetingArray[‘id’] = ‘Meeting ID’;**  
**&nbsp; &nbsp; $endAMeetingArray[‘host\_id’] = ‘Host ID’;**  
**&nbsp; &nbsp; return $this-\>sendRequest(‘meeting/end’, $endAMeetingArray);**  
**}**

Above functions ends ongoing meeting if we pass ongoing meeting’s id and host id.

Now to end meetings automatically I can run cron job on server to get meeting & host ids from my database of ongoing meetings whose meeting duration is passed. And then I can execute above function with retrieved values. So it will automatically end ongoing meetings for me.

**Is there any better way to end meetings than this (as I am not sure if this is a&nbsp;good&nbsp;way to achieve this)?** As I will have to run cron job for this every minute to end meetings automatically on time. &nbsp;

&nbsp;

---

<div class="post-metadata">

**Author:** ![Joshua\_Woodward1](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/joshua_woodward1/32/1480_2.png) [@Joshua\_Woodward1](https://devforum.zoom.us/u/Joshua_Woodward1)\
**Post date:** [November 27, 2017, 8:50pm UTC](https://devforum.zoom.us/t/how-to-end-zoom-meeting-automatically/798/3 "2017-11-27T20:50:58Z")

</div>

HI,

Duration is not a hard stop parameter, it’s used to determine end time for calendar invites. The endAMeeting function you created is the only way to end a meeting&nbsp;through the API&nbsp;

---

<div class="post-metadata">

**Author:** ![Teacher\_1](https://avatars.discourse-cdn.com/v4/letter/t/8edcca/32.png) [@Teacher\_1](https://devforum.zoom.us/u/Teacher_1)\
**Post date:** [June 5, 2018, 4:31am UTC](https://devforum.zoom.us/t/how-to-end-zoom-meeting-automatically/798/4 "2018-06-05T04:31:19Z")

</div>

This seems like it could easily be added as a feature to zoom. They already support hard stops of 40 minutes for non-paying accounts. Can we please add this? Our team needs it as well. It is a critical feature!

---

<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:** [June 6, 2018, 8:19pm UTC](https://devforum.zoom.us/t/how-to-end-zoom-meeting-automatically/798/5 "2018-06-06T20:19:21Z")

</div>

Hi All,

Thanks for the feedback! I will submit this to our roadmap suggestions but currently won’t be able to provide any timeline for this feature release.&nbsp;

&nbsp;

&nbsp;

---

<div class="post-metadata">

**Author:** ![Stephen\_Wong](https://avatars.discourse-cdn.com/v4/letter/s/ba9def/32.png) [@Stephen\_Wong](https://devforum.zoom.us/u/Stephen_Wong)\
**Post date:** [July 10, 2018, 6:43pm UTC](https://devforum.zoom.us/t/how-to-end-zoom-meeting-automatically/798/6 "2018-07-10T18:43:42Z")

</div>

Since “/meeting/end” is a deprecated V1 API call, has anyone had any success using its V2 replacement?

PUT [https://api.zoom.us/v2/meetings/{meetingId}/status](https://api.zoom.us/v2/meetings/%7BmeetingId%7D/status)

Even though I get the expected 204 return code, it seems to do nothing for me, i.e. one can still join the meeting and various V2 API calls complain that the meeting has not ended.

Thanks for any advice/help!&nbsp;

&nbsp;

---

<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:** [July 10, 2018, 10:46pm UTC](https://devforum.zoom.us/t/how-to-end-zoom-meeting-automatically/798/7 "2018-07-10T22:46:44Z")

</div>

Hi Stephen,&nbsp;

We can continue the conversation about ending the meeting here&nbsp;[https://support.zoom.us/hc/en-us/community/posts/115011326366/comments/360000677446.&nbsp;](https://support.zoom.us/hc/en-us/community/posts/115011326366/comments/360000677446.%C2%A0)

---

<div class="post-metadata">

**Author:** ![ericluciano](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ericluciano/32/12664_2.png) [@ericluciano](https://devforum.zoom.us/u/ericluciano)\
**Post date:** [August 18, 2020, 11:15pm UTC](https://devforum.zoom.us/t/how-to-end-zoom-meeting-automatically/798/8 "2020-08-18T23:15:08Z")

</div>

Is there this funcionality already? It’s extremally important for classes!

---

<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 19, 2020, 9:18pm UTC](https://devforum.zoom.us/t/how-to-end-zoom-meeting-automatically/798/9 "2020-08-19T21:18:46Z")

</div>

Hey @ericluciano,

If you are looking for an end meeting API, you can use the [Update Meeting Status endpoint.](https://marketplace.zoom.us/docs/api-reference/zoom-api/meetings/meetingstatus)

Thanks,  
Tommy
