# Make sure to set a proper session id using the \`session\_request\` socketIO event

**URL:** <https://forum.rasa.com/t/make-sure-to-set-a-proper-session-id-using-the-session-request-socketio-event/36126>\
**Category:** \[Deprecated\] Rasa X Community Edition\
**Created:** [October 21, 2020, 10:01am UTC](https://forum.rasa.com/t/make-sure-to-set-a-proper-session-id-using-the-session-request-socketio-event/36126 "2020-10-21T10:01:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Copser](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/copser/32/11090_2.png) [@Copser](https://forum.rasa.com/u/Copser)\
**Post date:** [October 21, 2020, 10:01am UTC](https://forum.rasa.com/t/make-sure-to-set-a-proper-session-id-using-the-session-request-socketio-event/36126/1 "2020-10-21T10:01:26Z")

</div>

Hello there, we have a RASA X server on AWS, and we are sending/receiving messages over socket channel.

From the docs

> By default, the SocketIO channel uses the socket id as `sender_id` , which causes the session to restart at every page reload. `session_persistence` can be set to `true` to avoid that. In that case, the frontend is responsible for generating a session id and sending it to the Rasa Core server by emitting the event `session_request` with `{session_id: [session_id]}` immediately after the `connect` event

and we are initializing a connection from `useEffect` and omitting `userId` as `session_id`

```
  // connect to server
  useEffect(() => {
    socket.on('connect', () => {
      console.log('SOCKET: connected to the socket server', socket.connected, socket.id)
      socket.emit('session_request', { session_id: userId })
    })
    socket.on('error', (err) => {
      console.log('SOCKET: errors', err)
    })
    socket.on('connect_error', (error) => {
      console.log('SOCKET: connect_error ---->', error)
    })
  }, [])

```

But when we connect to the server we see

> UserWarning: A message without a valid session\_id was received. This message will be ignored. Make sure to set a proper session-id using the `session_request` socketIO event.

What is a proper session id which RASA expects us to send?

---

<div class="post-metadata">

**Author:** ![Copser](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/copser/32/11090_2.png) [@Copser](https://forum.rasa.com/u/Copser)\
**Post date:** [October 21, 2020, 10:53am UTC](https://forum.rasa.com/t/make-sure-to-set-a-proper-session-id-using-the-session-request-socketio-event/36126/2 "2020-10-21T10:53:22Z")

</div>

Solution to this problem was, the `user_id` which we have is something like this

`9b91ffa3-35d2-44b7-9782-92ae9f17de2e`

and RASA want’s us to send him this

`9b91ffa335d244b7978292ae9f17de2e`,

hope this can help someone.
