Need Help Integrating Rasa Chatbot with Website

Hi Rasa Community,

I’m having trouble integrating a Rasa chatbot into my website. I’ve followed the official documentation and several community guides but am still facing issues. Here’s what I’ve done so far:

Step are:

  • Installed using pip install rasa
  • Created a project with rasa init
  • Successfully trained the model with rasa train
  • Running with rasa run -m models --enable-api --cors "*"
  • After that port is running http://localhost:5005

with the help of http://localhost:5005/webhooks/rest/webhook this URL in the direct API call, I got the response.

When I try to integrate into my website with the help of the below code. In the chatbox when I send the message based on this I do not get back any response or message. but in the terminal where I run the rasa model here requests have been made.

I do not understand what is the error or issue here. I also attach a screenshot of the chat box.

Please check my below code and please me resolve the issue that I am facing.

<!DOCTYPE html>
<html lang="en">

    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Chat Bot</title>

    <h1>Hello Website</h1>
    <p>Interact with our chatbot using the chat widget in the corner!</p>

    <!-- Rasa Chat Widget -->
    <div id="rasa-chat-widget" data-websocket-url="http://localhost:5005/"></div>
    <script src="" type="application/javascript"></script>


Is the socket channel enabled in your credentials.yml? Docs are here. You should see the endpoint listed when you do the rasa run.