https://discord.gg/botpress logo
w
Thnaks, but not works
w
Are there errore in console browser?
l
why are you using iframe? do you want to load full screen or as bubble?
Copy code
<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>BotPress Webchat</title>
</head>
<body>
    <div class="webchat" style="height: 600px; width: 400px;">
        <script src="https://cdn.botpress.cloud/webchat/v2.2/inject.js"></script>
        <script defer>
            window.botpress.on("webchat:ready", (conversationId) => {
                botpress.open(); // Opens the chat once ready
            });

            // BotPress configuration
            window.botpress.init({
                "botId": "d3aea06d-0f04-4701-bec3-b457caf79902",
                "configuration": {
                    "website": {},
                    "email": {},
                    "phone": {},
                    "termsOfService": {},
                    "privacyPolicy": {},
                    "color": "#3B82F6",
                    "variant": "solid",
                    "themeMode": "light",
                    "fontFamily": "inter",
                    "radius": 1
                },
                "clientId": "0e772c62-e321-46b5-a9fb-a88c5104e067"
            });
        </script>
    </div>
</body>
</html>
w
Did you click on the bubble, or did the webchat open automatically?
Copy code
html
<div id="webchat-container" style="position: relative; width: 100%; height: 100%;">
  <script src="https://cdn.botpress.cloud/webchat/v2.2/inject.js"></script>
  <script defer>
    window.botpress.on("webchat:ready", (conversationId) => {
      botpress.open();
    });
    window.botpress.on("conversation", (conversationId) => {
      botpress.open();
    });
  </script>
  <script src="https://files.bpcontent.cloud/yyyy/mm/dd/hh/yyyymmddhhnnss-XXXXXXXX.js"></script>
    <style>
    #webchat-container {
      position: relative;
      width: 100%;
      height: 100%;
    }
    .bpFab {
      display: none;
    }
    .bpWebchat {
      position: absolute !important;
      top: 0 !important;
      left: 0 !important;
      right: 0 !important;
      bottom: 0 !important;
      width: 100% !important;
      height: 100% !important;
    }
  </style>
</div>
It's the same without the copy-and-paste configuration. Copying is unhelpful if you don't need to change anything.
l
it remained open on launch
3 Views