Widget bug
# support
s
v
Hi @sorock, I'm an AI assistant for Vapi. I'll analyze available sources and get back to you shortly.
----------------------------- **While I generate an answer, here are some sources that might be helpful**: * [Voice Widget Example]() * [Web SDK]() * [Inbound Support Example]() * [Web Calling]() -----------------------------
### Answer It appears you might be facing issues similar to those reported by other users regarding the Vapi web widget. Here are a few troubleshooting steps you can try: 1. **Check Your Code Snippet**: Ensure that your code snippet for the widget is correctly placed in your website's HTML, ideally before the closing
</body>
tag. Here's a basic example:
Copy code
html
    <script>
    var vapiInstance = null;
    const assistant = "<assistant_id>"; // Substitute with your assistant ID
    const apiKey = "<your_public_api_key>"; // Substitute with your Public key from Vapi Dashboard.
    const buttonConfig = {}; // Modify this as required
    (function (d, t) {
    var g = document.createElement(t),
    s = d.getElementsByTagName(t)[0];
    g.src =
    "https://cdn.jsdelivr.net/gh/VapiAI/html-script-tag@latest/dist/assets/index.js";
    g.defer = true;
    g.async = true;
    s.parentNode.insertBefore(g, s);
    g.onload = function () {
    vapiInstance = window.vapiSDK.run({
    apiKey: apiKey, // mandatory
    assistant: assistant, // mandatory
    config: buttonConfig, // optional
    });
    };
    })(document, "script");
    </script>
[(1)]() , [(2)]() 2. **Verify API Key and Assistant ID**: Make sure your API key and assistant ID are correctly entered and valid. 3. **Inspect Network Requests**: Check the network tab in your browser's developer tools to see if there are any failing network requests that might provide clues. 4. **Try Different Devices or Browsers**: Sometimes issues may be specific to certain devices or browsers. If these steps don't resolve the issue, you might want to consult the Vapi documentation for [Voice Widget Example 🎧]() for more details [(1)]() , [(2)]() .
Got it. Tagging @User for additional help.
s
Can so tell me what is the error message?