> For the complete documentation index, see [llms.txt](https://docs.digitalsamba.com/reference/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.digitalsamba.com/reference/sdk/methods/endsession.md).

# endSession()

Ends the session for everyone. By default a confirmation popup is shown, but you can override that with a boolean parameter. If you set the value to **false**, all users are immediately removed from the room and the call ends without any confirmation modals of the action.

```javascript
//End the session, but shows first a confirmation modal
sambaFrame.endSession();

//End the session without showing any confirmation modal
sambaFrame.endSession(false);
```

{% hint style="warning" %}
This method ends the whole call and everyone is removed from the room.

For only the local user to leave the session - use the [leaveSession](/reference/sdk/methods/leavesession.md) method instead.
{% endhint %}

**Sample use case**: \
You want moderators to be able to end calls by clicking a custom button in your integration.
