# Frontend for chatbot

**URL:** <https://forum.rasa.com/t/frontend-for-chatbot/13627>\
**Category:** Rasa Open Source\
**Created:** [July 27, 2019, 8:36pm UTC](https://forum.rasa.com/t/frontend-for-chatbot/13627 "2019-07-27T20:36:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rmiiitb](https://avatars.discourse-cdn.com/v4/letter/r/eb9ed0/32.png) [@rmiiitb](https://forum.rasa.com/u/rmiiitb)\
**Post date:** [July 27, 2019, 8:36pm UTC](https://forum.rasa.com/t/frontend-for-chatbot/13627/1 "2019-07-27T20:36:21Z")

</div>

Hi I have created one chatbot using rasa-nlu and rasa-core and it works fine from the shell. Now I want to integrate this chatbot in a webpage (as a part of my assignment) but I’m unable to find any step by step tutorial on how to accomplish this, I’ve read the documentation and tried to understand and gain insights from the github page of scalableminds but to no avail.

Could someone please point me to the right direction.

Thanks Rahul

---

<div class="post-metadata">

**Author:** ![JiteshGaikwad](https://avatars.discourse-cdn.com/v4/letter/j/77aa72/32.png) [@JiteshGaikwad](https://forum.rasa.com/u/JiteshGaikwad)\
**Post date:** [July 28, 2019, 2:56pm UTC](https://forum.rasa.com/t/frontend-for-chatbot/13627/2 "2019-07-28T14:56:47Z")

</div>

Hey @rmiiitb you can connect your bot to a frontend or website using rest API of Rasa:

I had mentioned the steps in the below post, you can refer to this post:

> [@Rest api implementation](http://forum.rasa.com/t/rest-api-implementation/12624/3):
>
> Hey @chinnusujitha, just follow the below steps to connect your bot to custom channel using REST api, Step1: you need to ensure your credentials.yml has the following content: Step2: Once you have trained your bot, you can start your bot server by running the below command rasa run -m models --enable-api --cors “\*” --debug Once you run this command, you can see the below output in the terminal [image] Step3: Once your server is up and running you can access your bot throught R…

You can try out my custom UI: [Rasa Custom UI v\_2.0](http://forum.rasa.com/t/rasa-custom-ui-v-2-0/11622)

---

<div class="post-metadata">

**Author:** ![rmiiitb](https://avatars.discourse-cdn.com/v4/letter/r/eb9ed0/32.png) [@rmiiitb](https://forum.rasa.com/u/rmiiitb)\
**Post date:** [July 29, 2019, 4:49am UTC](https://forum.rasa.com/t/frontend-for-chatbot/13627/3 "2019-07-29T04:49:12Z")

</div>

Super thanks Jitesh !

However, after following the steps provided, I get the below error -

 ![post%20error](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/4/4562af098ca73a6bb7a0cae2f1b68e8984ede943.png)

And this is what I see in my debug console -

> Blockquote [2019-07-29 11:41:31 +0530] [10384] [ERROR] Exception occurred while handling uri: ‘[http://localhost:5005/webhooks/rest/webhook](http://localhost:5005/webhooks/rest/webhook)’ Traceback (most recent call last): File “c:\users\hp\anaconda3\lib\site-packages\sanic\request.py”, line 149, in load\_json self.parsed\_json = loads(self.body) ValueError: Expected object or value

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “c:\users\hp\anaconda3\lib\site-packages\sanic\app.py”, line 917, in handle\_request response = await response File “c:\users\hp\anaconda3\lib\site-packages\rasa\core\channels\channel.py”, line 430, in receive sender\_id = await self.\_extract\_sender(request) File “c:\users\hp\anaconda3\lib\site-packages\rasa\core\channels\channel.py”, line 395, in \_extract\_sender return req.json.get(“sender”, None) File “c:\users\hp\anaconda3\lib\site-packages\sanic\request.py”, line 143, in json self.load\_json() File “c:\users\hp\anaconda3\lib\site-packages\sanic\request.py”, line 153, in load\_json raise InvalidUsage(“Failed when parsing body as json”) sanic.exceptions.InvalidUsage: Failed when parsing body as json

> Blockquote

---

<div class="post-metadata">

**Author:** ![JiteshGaikwad](https://avatars.discourse-cdn.com/v4/letter/j/77aa72/32.png) [@JiteshGaikwad](https://forum.rasa.com/u/JiteshGaikwad)\
**Post date:** [July 29, 2019, 11:12am UTC](https://forum.rasa.com/t/frontend-for-chatbot/13627/4 "2019-07-29T11:12:11Z")

</div>

Hey @rmiiitb try to stringify the request parameters before making the API call
