# Can't connect rasa with rasa-webchat through socket.io

**URL:** <https://forum.rasa.com/t/cant-connect-rasa-with-rasa-webchat-through-socket-io/12027>\
**Category:** Rasa Open Source\
**Created:** [June 25, 2019, 9:29am UTC](https://forum.rasa.com/t/cant-connect-rasa-with-rasa-webchat-through-socket-io/12027 "2019-06-25T09:29:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nick\_Kazakov](https://avatars.discourse-cdn.com/v4/letter/n/90db22/32.png) [@Nick\_Kazakov](https://forum.rasa.com/u/Nick_Kazakov)\
**Post date:** [June 25, 2019, 9:29am UTC](https://forum.rasa.com/t/cant-connect-rasa-with-rasa-webchat-through-socket-io/12027/1 "2019-06-25T09:29:50Z")

</div>

I tried to use different version of webchat 0.4.1, 0.5.3, 0.5.9 still doesn’t work.

Rasa logs:

```auto
2019-06-25 12:17:11 INFO engineio.server - e15fd17ab7fc42a992207534a125be05: Sending packet OPEN data {'sid': 'e15fd17ab7fc42a992207534a125be05', 'upgrades': ['websocket'], 'pingTimeout': 60000, 'pingInterval': 25000}
2019-06-25 12:17:11 INFO engineio.server - e15fd17ab7fc42a992207534a125be05: Sending packet MESSAGE data 0

```

I’ve read many threads here and i think this is about upgrading websocket but i don’t know what doest i mean.

So i have flask hello world with rasa-webchat and running rasa in another shell.

Can you tell me please how i can fix this problem?

---

<div class="post-metadata">

**Author:** ![Nick\_Kazakov](https://avatars.discourse-cdn.com/v4/letter/n/90db22/32.png) [@Nick\_Kazakov](https://forum.rasa.com/u/Nick_Kazakov)\
**Post date:** [June 27, 2019, 9:33am UTC](https://forum.rasa.com/t/cant-connect-rasa-with-rasa-webchat-through-socket-io/12027/2 "2019-06-27T09:33:33Z")

</div>

The error was caused by CORS. So i point ngrok url to webchat.

---

<div class="post-metadata">

**Author:** ![SallemiDorsaf](https://avatars.discourse-cdn.com/v4/letter/s/b782af/32.png) [@SallemiDorsaf](https://forum.rasa.com/u/SallemiDorsaf)\
**Post date:** [August 13, 2019, 10:10am UTC](https://forum.rasa.com/t/cant-connect-rasa-with-rasa-webchat-through-socket-io/12027/3 "2019-08-13T10:10:59Z")

</div>

hi @Nick_Kazakovcan you tell me please how to connect rasa webchat through socket io i didn’t found documentation or steps to do it

---

<div class="post-metadata">

**Author:** ![adarsh666](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/adarsh666/32/4227_2.png) [@adarsh666](https://forum.rasa.com/u/adarsh666)\
**Post date:** [August 27, 2019, 8:52am UTC](https://forum.rasa.com/t/cant-connect-rasa-with-rasa-webchat-through-socket-io/12027/4 "2019-08-27T08:52:38Z")

</div>

@SallemiDorsaf I had the same issue , I resolved it by updating to latest version of rasa. Once you have your bot ready add the below configuration in the credentials.yml file

```
socketio:
user_message_evt: user_uttered
bot_message_evt: bot_uttered
session_persistence: true

```

Now start your bot using this command 🙂

`rasa run -m models --enable-api --cors "*" --debug`

---

<div class="post-metadata">

**Author:** ![zuyao1988](https://avatars.discourse-cdn.com/v4/letter/z/50afbb/32.png) [@zuyao1988](https://forum.rasa.com/u/zuyao1988)\
**Post date:** [January 9, 2020, 9:41am UTC](https://forum.rasa.com/t/cant-connect-rasa-with-rasa-webchat-through-socket-io/12027/5 "2020-01-09T09:41:01Z")

</div>

You r the best. the best.
