# End Session

The **End Session** Action is used to end the current user's Session. This Action is mostly used to reset the state of a Chat Bot. It can also be used when a customer is finished with a Session and doesn't need to access it anymore.

If the End Session Action isn't used, a Session will expire after 30 days. This default can be changed from [Settings](../studio/builder-bar/settings), or modified dynamically with the [Extend Session Expiration Time Action](the-extend-session-expiration-time-action).

Also, from **Settings**, an HTML page can be set for the user to see when opening a link to an expired Session.

![](https://2093598723-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC2DgLBPTrwoEhWaU24LL%2Fuploads%2Fgit-blob-3bc58fc3661d5401b85c3c9c5fdfde07aa6ef535%2Fthe-end-session-action-v180-0.png?alt=media)

## Use Cases

* The user has reached the end of a Chat Bot flow, and their next text message should start the Chat Bot again from the beginning
* If is not preferred that users can resume a Session once they left off, this action can be used to make sure the old Session is not accessible any more. This would be useful in a situation where the user should start a new Session rather than use an old one.

## Example

In this example, after the user receives their purchase and the corresponding delivery notification, the Session ends.

![](https://2093598723-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC2DgLBPTrwoEhWaU24LL%2Fuploads%2Fgit-blob-88d4f2d48527d37786c351c071c641271970f9af%2Fthe-end-session-action-v180-1.png?alt=media)
