window.botpressWebChat.init({
"botId": "YOUR BOT ID",
"clientId": "YOUR CLIENT ID",
"hostUrl": "https://cdn.botpress.cloud/webchat/v0",
"messagingUrl": "https://messaging.botpress.cloud",
"botName": "BOT NAME",
// Set the width of the WebChat container and layout to 100% (Full Screen)
"containerWidth": "100%25",
"layoutWidth": "100%25",
// Hide the widget and disable animations
"hideWidget": true,
"disableAnimations": true
});
// Opens up the Chatbot by default
// This lets users start chatting with the Chatbot without needing to click any buttons or menus.
window.botpressWebChat.onEvent(
function () {
window.botpressWebChat.sendEvent({ type: "show" });
},
["LIFECYCLE.LOADED"]
);