# Session expiration

**URL:** https://forum.rasa.com/t/session-expiration/23058
**Category:** Rasa Open Source
**Created:** [January 4, 2020, 2:05pm UTC](https://forum.rasa.com/t/session-expiration/23058 "2020-01-04T14:05:34Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![anuragchaudhary](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/anuragchaudhary/32/6466_2.png) [@anuragchaudhary](https://forum.rasa.com/u/anuragchaudhary)
#### Post date: [January 4, 2020, 2:05pm UTC](https://forum.rasa.com/t/session-expiration/23058/1 "2020-01-04T14:05:34Z")

</div>

Hi

I was trying to end my assistant session. After searching in the docs I came across

session\_config: session\_expiration\_time: 2

setting assistants session time two minutes but the session doesn’t ends. the assistant still replies after 2 minutes as well.

Any other changes I have to make apart from domain.yml

---

<div class="post-metadata">

### Author: ![stephens](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/stephens/32/1632_2.png) [@stephens](https://forum.rasa.com/u/stephens)
#### Post date: [January 6, 2020, 7:34am UTC](https://forum.rasa.com/t/session-expiration/23058/2 "2020-01-06T07:34:41Z")

</div>

`session_expiration_time` defines the time of inactivity in minutes after which a new session will begin. There’s a description [here](https://rasa.com/docs/rasa/core/domains/#session-configuration).

What type of channel are you using for your users to chat with the bot? Do you want to completely block them from accessing the bot at some point?

---

<div class="post-metadata">

### Author: ![anuragchaudhary](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/anuragchaudhary/32/6466_2.png) [@anuragchaudhary](https://forum.rasa.com/u/anuragchaudhary)
#### Post date: [January 6, 2020, 8:23am UTC](https://forum.rasa.com/t/session-expiration/23058/3 "2020-01-06T08:23:18Z")

</div>

Yes, I’m using a custom web UI with rest webhook. I’m trying provide a button for session expiration. So that user can end the session from their end and completely block themselves for accessing. The session should start after they refresh. So is their any way to put that session\_expiration in a button.

---

<div class="post-metadata">

### Author: ![stephens](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/stephens/32/1632_2.png) [@stephens](https://forum.rasa.com/u/stephens)
#### Post date: [January 9, 2020, 7:04am UTC](https://forum.rasa.com/t/session-expiration/23058/4 "2020-01-09T07:04:18Z")

</div>

I don’t think `session_expiration` and a button is going to work for you because this is a global setting (not per user). Depending on the details of your requirements, you should look into the `action_session_start`[here](https://rasa.com/docs/rasa/api/rasa-sdk/#customising-the-session-start-action) where you could control access for users when they connect.
