🚀 AI Assistant Widget - Iframe Integration

Complete guide for embedding the AI Assistant on your website

📱 Live Demo

✅ Bypass Mode Active: This demo uses bypassName=true to skip the registration modal.

Test Responsive Sizes:

🔧 Integration Guide

Basic Iframe Embed:

<iframe
  src="https://widget.tommytalk.ai/widget.html?assistantId=YOUR_ASSISTANT_ID&assistantName=Your+Assistant&theme=light"
  width="100%"
  height="700"
  frameborder="0"
  allow="microphone; camera">
</iframe>

With Bypass Parameters:

<iframe
  src="https://widget.tommytalk.ai/widget.html?assistantId=YOUR_ASSISTANT_ID&assistantName=Your+Assistant&theme=light&bypassName=true&bypassEmail=true"
  width="100%"
  height="700"
  frameborder="0"
  allow="microphone; camera">
</iframe>

Available Parameters:

  • assistantId - Required. Your assistant's unique ID
  • assistantName - Display name for the assistant
  • theme - light | dark | auto
  • bypassName - true to skip name entry
  • bypassEmail - true to skip email entry
  • userName - Pre-fill user's name
  • userEmail - Pre-fill user's email
  • voiceInput - true to enable voice input
  • showMinimizeButton - true | false
  • showCloseButton - true | false
💡 Pro Tip: Use bypassName=true for instant access without registration. Perfect for demos, kiosks, or anonymous support.

Responsive Container:

<style>
  .chat-widget-container {
    width: 100%;
    max-width: 500px;
    height: 700px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 40px rgba(0,0,0,0.16);
  }
  
  .chat-widget-iframe {
    width: 100%;
    height: 100%;
    border: none;
  }
  
  /* Mobile responsive */
  @media (max-width: 768px) {
    .chat-widget-container {
      height: 100vh;
      max-width: 100%;
      border-radius: 0;
    }
  }
</style>

<div class="chat-widget-container">
  <iframe 
    class="chat-widget-iframe"
    src="https://widget.tommytalk.ai/widget.html?..."
    allow="microphone; camera">
  </iframe>
</div>
⚠️ Important: Always include allow="microphone; camera" if you plan to use voice features.

Full-Page Integration:

<style>
  html, body {
    margin: 0;
    padding: 0;
    height: 100%;
  }
  
  .fullpage-widget {
    width: 100vw;
    height: 100vh;
    border: none;
  }
</style>

<iframe 
  class="fullpage-widget"
  src="https://widget.tommytalk.ai/widget.html?..."
  allow="microphone; camera">
</iframe>

JavaScript Control (Optional):

<script>
  // Listen for widget ready event
  window.addEventListener('message', function(event) {
    if (event.data.type === 'widget:ready') {
      console.log('Widget is ready!');
    }
  });
  
  // Dynamic iframe creation
  function createWidget(assistantId, containerId) {
    const container = document.getElementById(containerId);
    const iframe = document.createElement('iframe');
    
    iframe.src = `https://widget.tommytalk.ai/widget.html?assistantId=${assistantId}&theme=light&bypassName=true`;
    iframe.width = '100%';
    iframe.height = '700';
    iframe.frameBorder = '0';
    iframe.allow = 'microphone; camera';
    
    container.appendChild(iframe);
  }
</script>

🎯 Common Issues & Solutions

Issue: Widget appears blurry or has low contrast

  • Solution: We've added enhanced CSS for better clarity. Make sure you're using the latest version.

Issue: Keyboard covers input on mobile

  • Solution: Fixed with proper viewport handling and sticky positioning. The input now stays visible above the keyboard.

Issue: Registration modal shows even with bypassName=true

  • Solution: Fixed in latest version. Make sure the URL includes bypassName=true parameter.

Issue: Widget doesn't fill iframe properly

  • Solution: Set both width and height on the iframe. Use height="700" or a CSS height value.

Issue: Voice input not working

  • ⚠️ Solution: Add allow="microphone" to the iframe tag and ensure HTTPS is used.