Skip to main content

Quick Start

Add these lines to your HTML:

Installation Options

CDN (unpkg)

CDN (jsDelivr)

Self-hosted

Download the files and host them yourself:

Initialization

JavaScript API

Data Attributes (Auto-initialization)

Use data attributes for simpler setup:
The widget auto-initializes when data attributes are present.

Authentication Options

Direct API (Bearer Token)

Proxy Mode

When your backend handles authentication:

Configuration Options


Dynamic Token Updates

Update the session token without re-initializing:

Full Example

Basic Implementation

Embedded in Existing Page

With Proxy Backend


Styling & Customization

Container Sizing

The widget fills its container. Control size via the container:

Custom Styling

Override CSS variables:

WordPress Integration

Add to your theme’s footer.php or use a custom HTML block:

Troubleshooting

Widget Not Appearing

  1. Check the container exists: document.getElementById('cuadra-chat')
  2. Ensure CSS is loaded before the script
  3. Check browser console for errors
  4. Verify container has explicit height

Authentication Errors

  1. Check session token is valid
  2. Verify API key has correct permissions
  3. Use browser Network tab to inspect requests

Styling Issues

  1. Ensure CSS file is loaded
  2. Check for CSS conflicts with your site
  3. Use browser DevTools to inspect elements

Next Steps

React Components

Use native React components for more control

API Reference

Build custom chat implementations