Quick Start
To integrate IniDeck Chatbot, add the following script to your HTML page before the closing
</body> tag.
<!-- Include the IniDeck Chatbot Script -->
<script src="https://chatbotapi.inideck.com/widget/inideck-chatbot.iife.js"></script>
<!-- Initialize the Chatbot -->
<script>
IniDeckChatbot.init({
handshakeToken: "YOUR_HANDSHAKE_TOKEN",
theme: "light",
position: "bottom-right",
welcomeMessage: "Hi! How can I help you today?"
});
</script>
Configuration Options
Customize the look and behavior of your chatbot using the init function options.
| Option | Type | Default | Description |
|---|---|---|---|
handshakeToken |
string |
- | Required. Your unique API access token. |
apiUrl |
string |
'https://chatbotapi...' |
The base URL for the chat service. |
theme |
'light' | 'dark' |
'light' |
Visual mode of the widget. |
position |
'bottom-right' | 'bottom-left' |
'bottom-right' |
Where the bubble appears. |
primaryColor |
string |
'#5b4bff' |
Custom hex color for buttons and accents. |
welcomeMessage |
string |
'Hi! How can I help?' |
First message shown to user. |
persistSession |
boolean |
false |
Keep chat history across refreshes. |
JavaScript API
Control the widget programmatically using the window.IniDeckChatbot object.
// Open the chat window
IniDeckChatbot.open();
// Close the chat window
IniDeckChatbot.close();
// Send a custom message from the user
IniDeckChatbot.sendMessage("Help me with my account");
// Listen for events
IniDeckChatbot.on("message", (msg) => {
console.log("New message received:", msg.text);
});
Interactive Demo
Test the widget's API functions in real-time. Use the buttons below to interact with the active widget on this page.
Open / Close
Widget Theme
Send Hello
Looking for the chat bubble? It's in the bottom-right corner!