How to leaveMeeting by an external button

We are adding an external html button to leave the meeting. We are able to init and join a meeting fine, however we want to be able to run sdk functions to interact with the meeting from custom buttons. The main one is to allow user to leave the meeting with a custom button located outside the meeting iframe. The javascript function is:

function leave()

leaveUrl: ‘/index.html’,
success: function(response) {
error: function (err) {

We are geting the following error:
errorCode: 3008
errorMessage: “Please init meeting first!
method: “leaveMeeting”
result: null
status: false

We are using the CDN files Version 1.7.10

This issue is happening in all browsers and also in many other ZoomMgt functions.

Hey @tom3,

You will need to have the leave meeting function be called within the same scope as where you are initing and joining the Web SDK.

If you share your code snippets I can help.


Hi Tommy:

Thanks for your answer, we will do that.


1 Like

You are welcome! :slight_smile:


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