# How to connect my api through sockei id

**URL:** <https://forum.rasa.com/t/how-to-connect-my-api-through-sockei-id/21440>\
**Category:** Rasa Open Source\
**Created:** [November 19, 2019, 7:49am UTC](https://forum.rasa.com/t/how-to-connect-my-api-through-sockei-id/21440 "2019-11-19T07:49:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![desh\_mukh](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@desh\_mukh](https://forum.rasa.com/u/desh_mukh)\
**Post date:** [November 19, 2019, 7:49am UTC](https://forum.rasa.com/t/how-to-connect-my-api-through-sockei-id/21440/1 "2019-11-19T07:49:41Z")

</div>

I am very new in rasa. I am not able to connect my bot with a api through socket id. Please anyone help me as early as possible. Thanks

---

<div class="post-metadata">

**Author:** ![Mappi](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/mappi/32/6579_2.png) [@Mappi](https://forum.rasa.com/u/Mappi)\
**Post date:** [November 19, 2019, 8:53am UTC](https://forum.rasa.com/t/how-to-connect-my-api-through-sockei-id/21440/2 "2019-11-19T08:53:26Z")

</div>

Enable the socket io channel in the credentials.yml. After that, you should be able to connect to it after a restart.

---

<div class="post-metadata">

**Author:** ![desh\_mukh](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@desh\_mukh](https://forum.rasa.com/u/desh_mukh)\
**Post date:** [November 20, 2019, 9:43am UTC](https://forum.rasa.com/t/how-to-connect-my-api-through-sockei-id/21440/3 "2019-11-20T09:43:05Z")

</div>

Thank you for your response, but how I define the socket channel in the credentials.yml. socketio: user\_message\_evt: user\_uttered bot\_message\_evt: bot\_uttered session\_persistence: true I have done this before but it was not working for me.

---

<div class="post-metadata">

**Author:** ![Mappi](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/mappi/32/6579_2.png) [@Mappi](https://forum.rasa.com/u/Mappi)\
**Post date:** [November 20, 2019, 11:28am UTC](https://forum.rasa.com/t/how-to-connect-my-api-through-sockei-id/21440/4 "2019-11-20T11:28:39Z")

</div>

That’s all you need to define on Rasa’s side, is your problem on the client side? Try this:

- Run rasa using `rasa run --enable-api --debug`
- It should show the available webroutes including /socket.io

If it shows up:

- Start connecting rasa through a websocket
- Check the server log. It should be printing several debug logs from [engine.io](http://engine.io) and [socket.io](http://socket.io) whenever it receives events from your client.

---

<div class="post-metadata">

**Author:** ![desh\_mukh](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@desh\_mukh](https://forum.rasa.com/u/desh_mukh)\
**Post date:** [November 21, 2019, 9:33am UTC](https://forum.rasa.com/t/how-to-connect-my-api-through-sockei-id/21440/5 "2019-11-21T09:33:18Z")

</div>

Thank you so much for your help. I just confuse where I have to give my socket id to connect my server chat application. Please help me to define where and how can I define the socket host and port number then it will communicate with my rasa bot.
