For AI agents: visit https://documentation.indigitall.com/llms.txt for an index of all pages formatted in Markdown and endpoints in OpenAPI. Append .md to any documentation page URL to get its markdown version.
To add Web Chat, upload the SDK JavaScript and CSS files to your website and provide your public channelKey. The widget adds itself to the page; no HTML container or manual Socket.IO setup is required.
Value
Required
Description
channelKey
Yes
Public, unique channel or project identifier.
baseUrl
No
Web Chat environment URL. Defaults to https://eu1.chat-v2.indigitall.com.
contactCode
No
Stable contact ID. If omitted, the SDK creates a UUID for the browser-tab session.
contactName
No
Contact display name.
⚠️
Security
channelKey is public. Never include a serverKey, private token, or server credential in browser code.
download .zip and extract its two files to upload them to the main folder of your website.
🤖 Click to expand AI Integration Prompt (ChatGPT / Copilot / Claude)
Copy and paste this prompt into your AI assistant to accelerate your integration:
# Prompt: indigitall Web Chat SDK V2 Basic Integration
Copy this prompt into your AI assistant (GitHub Copilot, ChatGPT, Claude, etc.) to get guided through integrating indigitall Web Chat SDK V2 into your website.
---
Act as an expert engineer in indigitall Web Chat SDK V2 integration. Your goal is to help me add the Web Chat widget to my website, generating the final code adapted to my answers.
## Step 0 — Preliminary questions (REQUIRED)
Before generating any code, ask me these questions one by one and wait for my answers:
1. What is your public channelKey?
It is the public channel identifier provided by indigitall.
2. Where will you host the SDK files?
By default, use /indigitall/web-chat-sdk-v2.min.js and /indigitall/web-chat-sdk-v2.css.
3. Do you have identified users?
If yes, tell me where I can read the stable user ID and display name in the website code.
4. Do you need to use a custom Web Chat environment URL?
If yes, provide the baseUrl. If not, omit baseUrl and use the SDK default.
5. What language should the widget use?
Use en, es, or pt when possible.
6. Does your site use a strict CSP with nonces?
If yes, tell me how the server-generated nonce is exposed in the page.
## Step 1 — SDK files
Tell me to download the Web Chat SDK V2 .zip from the official documentation, extract it, and upload these files to my website:
- web-chat-sdk-v2.min.js
- web-chat-sdk-v2.css
Use the folder path I provided in question 2.
## Step 2 — Add the SDK to the page
Add the stylesheet and load the JavaScript before the closing </body> tag:
<link rel="stylesheet" href="/indigitall/web-chat-sdk-v2.css" />
<script>
const script = document.createElement('script')
script.src = '/indigitall/web-chat-sdk-v2.min.js'
script.charset = 'utf-8'
script.onload = () => {
window.supportChat = WebChat.init({
channelKey: 'YOUR_CHANNEL_KEY',
contactCode: window.currentUser?.id,
contactName: window.currentUser?.name,
language: 'en',
})
}
script.onerror = () => {
console.error('Could not load indigitall Web Chat')
}
document.body.appendChild(script)
</script>
## Step 3 — Adapt the code
Generate the final implementation applying these rules:
- Replace YOUR_CHANNEL_KEY with my public channelKey.
- Adjust the CSS and JS paths to the folder I provided.
- If I do not have identified users, remove contactCode and contactName.
- If I have identified users, use a stable contactCode. Never use passwords, access tokens, private keys, or sensitive data.
- Include baseUrl only if I provided a custom Web Chat environment URL.
- Set language to the language I requested.
- If my site uses CSP nonces, add cspStrict: { nonce: 'SERVER_GENERATED_NONCE' } and use the real server-generated nonce. Never generate the nonce in browser code.
- Store the returned instance in window.supportChat.
- If the project has logout, user-change, route cleanup, or component unmount logic, call window.supportChat?.destroy().
- Do not add a manual HTML container. WebChat.init() creates the launcher and panel automatically.
- Do not add Socket.IO manually.
- Do not expose serverKey, private tokens, or server credentials in browser code.
## Step 4 — Verification
Guide me to verify the integration:
1. Confirm web-chat-sdk-v2.css and web-chat-sdk-v2.min.js load with HTTP 200.
2. Confirm the floating launcher appears.
3. Check the browser console for loading or authorization errors.
4. If the chat does not connect, verify channelKey, baseUrl, CORS, and WebSocket/polling proxy rules.
5. If a new contact is created every visit, use a stable contactCode for identified users.
6. On logout or user change, confirm window.supportChat?.destroy() is called before initializing a new chat.
## Official documentation
For more details and advanced configuration options, refer to the official indigitall Web Chat SDK V2 documentation.
Important: AI can make mistakes. Always review and test the generated code before deploying it.
1. Upload the SDK files
Upload these files to a public folder, such as /indigitall/:
web-chat-sdk-v2.min.js
web-chat-sdk-v2.css
Use FTP, a hosting control panel, a CDN, or your normal deployment process.
2. Add Web Chat to your page
Paste this immediately before the closing </body> tag:
WebChat.init() automatically creates the floating launcher and chat panel.
Contact identification
Automatic session contact
When no user ID is available, omit contactCode:
WebChat.init({ channelKey: 'YOUR_CHANNEL_KEY' })
The SDK generates a UUID and saves it in sessionStorage. It is reused while the browser-tab session is active, then replaced after the tab or browser session ends.
Your own contact identifier
For identified users, pass a stable, unique value:
Only one Web Chat instance can be active. Calling WebChat.init() again automatically destroys and replaces the prior instance.
The returned instance has destroy(). Call it on logout, user changes, or when the containing view is removed:
window.supportChat?.destroy()
CSP with nonce
To keep the full normal UI under a CSP that requires a nonce for dynamically created style elements, configure the response and provide the same server-generated nonce to the SDK:
The response header must include style-src 'self' 'nonce-SERVER_GENERATED_NONCE'. The nonce is generated once per response by the server; never generate it in browser code. This lightweight mode retains normal customization and functionality, but it does not support style-src-attr 'none' because a nonce does not permit style attributes.
Troubleshooting
Issue
Recommended check
Launcher is not visible
Check JavaScript/CSS URLs and browser-console loading errors.
Chat cannot connect
Check channelKey, configured baseUrl, CORS, and the WebSocket/polling proxy.
A new contact is created on every visit
Pass a stable contactCode; automatic UUIDs only last for the browser-tab session.
Authorization error
Check that channelKey belongs to the intended channel and any provided contactCode is valid.