https://retellai.com/?utm_source=discord&utm_medium=seo logo
I am having issuse with the chatbot i have embeded...
# ❓・ai-evy-support
b
I am having issuse with the chatbot i have embeded it with my website but if i ask any question from it wont answer @AI Evy
a
Thanks for tagging me @bright_07115. I'll look through relevant sources and get back to you shortly.
### Answer I can help troubleshoot your Retell AI chatbot issue. Based on the documentation, here are the key things to verify for your embedded chat widget: Check Your Setup Configuration Ensure your script tag includes all required attributes [(1) ]() :
Copy code
html
<script
 id="retell-widget"
 src="<https://dashboard.retellai.com/retell-widget.js%22>
 type="module"
 data-public-key="YOUR_RETELL_PUBLIC_KEY"
 data-agent-id="YOUR_CHAT_AGENT_ID"
 data-agent-version="YOUR_AGENT_VERSION"
 data-title="YOUR_CUSTOM_TITLE"
 data-logo-url="YOUR_LOGO_URL"
 data-color="YOUR_CUSTOM_COLOR"
 data-bot-name="YOUR_BOT_NAME"
 data-popup-message="YOUR_POPUP_MESSAGE"
 data-show-ai-popup="true"
 data-show-ai-popup-time="5"
 data-auto-open="false"
 data-dynamic='{"key": "value"}'
 data-recaptcha-key="YOUR_GOOGLE_RECAPTCHA_SITE_KEY"
></script>
Prerequisites to Verify Make sure you have : - Created a chat agent using the Create Chat Agent guide - Your Retell Public Key - Your chat agent ID (not a voice agent ID) Common Issues The chat widget requires a chat agent specifically - if you're using a voice agent ID instead of a chat agent ID, the widget won't respond properly . Test Your Chat Agent You can test if your chat agent is working by using the API directly [(2) ]() :
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const chatResponse = await client.chat.create({ agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD' }) ;
console.log(chatResponse.agent_id) ;
If the API test works but your widget doesn't, the issue is likely in your widget configuration. If neither works, there may be an issue with your chat agent setup.
​ To learn more, see the sources I considered: [[1] Retell Website Widget](https://docs.retellai.com/deploy/chat-widget) [[2] Create Chat](https://docs.retellai.com/api-references/create-chat) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
b
this is the one i am using <script id="retell-widget" src="https://dashboard.retellai.com/retell-widget.js" type="module" data-public-key="public_key_09a62af3307ae5254f428" data-agent-id="agent_443c615df872315f4afb77c5e3" data-title="Milberg Motor Ai" data-color="#0033FF" data-bot-name="Milberg Motor AX Chatbot" data-popup-message="Having tech issues? I can guide you step by step." data-show-ai-popup="true" data-show-ai-popup-time="5" data-auto-open="false" data-dynamic='{"key": "value"}' >
this is the one i am using <script id="retell-widget" src="https://dashboard.retellai.com/retell-widget.js" type="module" data-public-key="public_key_09a62af3307ae5254f428" data-agent-id="agent_443c615df872315f4afb77c5e3" data-title="Milberg Motor Ai" data-color="#0033FF" data-bot-name="Milberg Motor AX Chatbot" data-popup-message="Having tech issues? I can guide you step by step." data-show-ai-popup="true" data-show-ai-popup-time="5" data-auto-open="false" data-dynamic='{"key": "value"}' > @AI Evy
a
Thanks for the follow-up, @bright_07115. I'll get back to you soon.
### Answer Your script configuration looks mostly correct, but I notice you're missing the
data-agent-version
attribute which is required for the chat widget to function properly [(1) ]() . Add the Missing Agent Version Update your script to include the agent version:
Copy code
html
<script
    id="retell-widget"
    src="<https://dashboard.retellai.com/retell-widget.js%22>
    type="module"
    data-public-key="public_key_09a62af3307ae5254f428"
    data-agent-id="agent_443c615df872315f4afb77c5e3"
    data-agent-version="YOUR_AGENT_VERSION"
    data-title="Milberg Motor Ai"
    data-color="#0033FF"
    data-bot-name="Milberg Motor AX Chatbot"
    data-popup-message="Having tech issues? I can guide you step by step."
    data-show-ai-popup="true"
    data-show-ai-popup-time="5"
    data-auto-open="false"
    data-dynamic='{"key": "value"}'
></script>
​ To learn more, see the sources I considered: [[1] Retell Website Widget](https://docs.retellai.com/deploy/chat-widget) [[2] Prevent abuse](https://docs.retellai.com/reliability/prevent-abuse) [[3] Retell AI Chat Agent – Real-Time Web Chat Automation Widget | Retell AI](https://www.retellai.com/blog/meet-retell-chat-agents-build-smarter-web-chats) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
Additional Troubleshooting Steps 1. **Verify Agent Type**: Make sure your agent ID corresponds to a chat agent, not a voice agent . The chat widget specifically requires a chat agent created using the Create Chat Agent guide . 2. **Check Public Key Configuration**: Ensure your public key is properly configured in the Retell dashboard and has the correct domain permissions [(2) ]() . 3. **Agent Version**: If you're unsure of your agent version, the documentation indicates that if
data-agent-version
is unset, it uses the latest version [(1) ]() . However, it's recommended to specify the version explicitly. 4. **Test Agent Functionality**: You can verify your chat agent is working by testing it directly in the Retell dashboard before embedding it on your website [(3) ]() . The missing
data-agent-version
attribute is likely the primary cause of your chatbot not responding to questions.
b
where can i get data-agent-version="YOUR_AGENT_VERSION" @AI Evy
a
Thanks for the follow-up, @bright_07115. I'll get back to you soon.
### Answer You can find your agent version number in several ways: Method 1: Using the Dashboard In the Retell AI dashboard, click on the Clock icon in the upper right corner of the agent page to view all versions of your agent [(1) ]() . The version number is displayed for each published version . Method 2: Using the Get Agent API You can retrieve the agent version using the API [(2) ]() :
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const agentResponse = await client.agent.get('16b980523634a6dc504898cda492e939') ;
console.log(agentResponse.version) ;
Method 3: Get All Agent Versions To see all versions of your agent [(3) ]() :
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const agentResponses = await client.agent.getVersions('16b980523634a6dc504898cda492e939') ;
console.log(agentResponses) ;
Version Number Format Version numbers are monotonically increasing integers [(1) ]() : - `0`: Initial version of the agent, first published version - `1`: Second published version of the agent - `2`: Current version of the agent Important Notes: - Published versions cannot be changed - Only the latest version can be modified - If you don't specify a version in your widget, it defaults to the latest version For your specific agent (
agent_443c615df872315f4afb77c5e3
) , you'll need to check your dashboard or use the API to get the current version number.
​ To learn more, see the sources I considered: [[1] Setup versioning for agents](https://docs.retellai.com/agent/version) [[2] Get Agent](https://docs.retellai.com/api-references/get-agent) [[3] Get Agent Versions](https://docs.retellai.com/api-references/get-agent-versions) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
b
hello @AI Evy
a
Thanks for the follow-up, @bright_07115. I'll get back to you soon.
### Answer Hi there! How can I help you with Retell AI today? Based on the thread history, I see you've been troubleshooting your embedded chat widget. You've already received guidance on: 1. Adding the missing
data-agent-version
attribute to your script [(1) ]() 2. How to find your agent version number using the dashboard or API [(1) ]() [(2) ]() [(3) ]() Is there something specific about your chatbot setup that's still not working, or do you have a new question about Retell AI?
​ To learn more, see the sources I considered: [[1] Setup versioning for agents](https://docs.retellai.com/agent/version) [[2] Get Agent Versions](https://docs.retellai.com/api-references/get-agent-versions) [[3] Get Agent](https://docs.retellai.com/api-references/get-agent) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
b
this is the issuse i am facing now Failed to load resource: the server responded with a status of 401 ()Understand this error api.retellai.com/get-chat/undefined:1 Failed to load resource: the server responded with a status of 401 ()Understand this error api.retellai.com/create-chat:1 Failed to load resource: the server responded with a status of 401 ()Understand this error api.retellai.com/create-chat-completion:1 Failed to load resource: the server responded with a status of 401 () @AI Evy
a
Thanks for the follow-up, @bright_07115. I'll get back to you soon.
### Answer Hi there! How can I help you with Retell AI today? Based on the thread history, I see you've been troubleshooting your embedded chat widget. You've already received guidance on: 1. Adding the missing
data-agent-version
attribute to your script 2. How to find your agent version number using the dashboard or API Is there something specific about your chatbot setup that's still not working, or do you have a new question about Retell AI? --- I don't have specific documentation about the 401 authentication errors you're encountering with the chat widget in the available sources. However, I can offer some general troubleshooting guidance: Common causes of 401 errors with embedded widgets: 1. Invalid or expired Public Key - Double-check that your
data-public-key="public_key_09a62af3307ae5254f428"
is correct and active in your Retell dashboard 2. Domain restrictions - Your public key may be restricted to specific domains. Verify in your dashboard that your website's domain is whitelisted 3. Agent ID mismatch - Ensure your
data-agent-id="agent_443c615df872315f4afb77c5e3"
corresponds to an actual chat agent (not a voice agent) 4. Missing agent version - As mentioned earlier, add the
data-agent-version
attribute to your script Recommended next steps: - Verify your public key configuration in the Retell dashboard - Check that your domain is authorized to use this public key - Confirm your agent ID is for a chat agent - Add the agent version to your script For additional support with authentication issues: - Visit [Contact Sales]() - Visit [) Would you like me to provide a general answer about authentication best practices, or do you have more specific details about your setup?
message has been deleted
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
b
this is the code <script id="retell-widget" src="https://dashboard.retellai.com/retell-widget.js" type="module" data-public-key="public_key_09a62af3307ae5254f428" data-agent-id="agent_4b09e38e1e05550570c39a142a" data-title="Milberg Motor Ai" data-color="#0033FF" data-bot-name="Milberg Motor AX Chatbot" data-popup-message="Having tech issues? I can guide you step by step." data-show-ai-popup="true" data-show-ai-popup-time="5" data-auto-open="false" data-dynamic='{"key": "value"}' > @User
<script id="retell-widget" src="https://dashboard.retellai.com/retell-widget.js" type="module" data-public-key="public_key_09a62af3307ae5254f428" data-agent-id="agent_4b09e38e1e05550570c39a142a" data-agent-version="5" data-title="Milberg Motor Ai" data-color="#0033FF" data-bot-name="Milberg Motor AX Chatbot" data-popup-message="Having tech issues? I can guide you step by step." data-show-ai-popup="true" data-show-ai-popup-time="5" data-auto-open="false" data-dynamic='{"key": "value"}' > Check it out @AI Evy
a
Thanks for the follow-up, @bright_07115. I'll get back to you soon.
### Answer Great! Your updated script now includes the
data-agent-version="5"
attribute which should resolve the authentication issues you were experiencing [(1) ]() . Your script configuration looks complete and follows the proper format for the Retell AI chat widget. The 401 errors you were seeing earlier were likely caused by the missing agent version parameter. Current Script Analysis Your script now includes all the essential attributes: - ✅
data-public-key
- Your public key for authentication - ✅
data-agent-id
- Your chat agent ID - ✅
data-agent-version="5"
- Now properly specified - ✅ All styling and behavior configurations Next Steps to Verify 1. Test the widget - The authentication errors should now be resolved 2. Check browser console - Look for any remaining error messages 3. Verify domain whitelisting - Ensure your website domain is authorized for your public key in the Retell dashboard [(2) ]() If you still encounter issues, there's a similar case in the Discord community where someone had domain whitelisting issues even though they thought their domain was properly configured . Double-check that: - Your exact domain (including subdomains) is whitelisted - The public key is active and correctly configured - You're using a chat agent ID (not a voice agent ID) The addition of
data-agent-version="5"
should resolve the 401 authentication errors you were experiencing with the API endpoints.
​ To learn more, see the sources I considered: [[1] Get Agent](https://docs.retellai.com/api-references/get-agent) [[2] Chat bot not responding](https://discord.com/channels/1186424376300679209/1384593638499160124) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
b
Failed to load resource: the server responded with a status of 401 () mila-chat?rc=test-site:1 Unchecked runtime.lastError: The message port closed before a response was received. api.retellai.com/create-chat:1 Failed to load resource: the server responded with a status of 401 () api.retellai.com/create-chat-completion:1 Failed to load resource: the server responded with a status of 401 () mila-chat?rc=test-site:1 Unchecked runtime.lastError: The message port closed before a response was received. @AI Evy
a
Thanks for the follow-up, @bright_07115. I'll get back to you soon.
​ To learn more, see the sources I considered: [[1] Create Chat Completion](https://docs.retellai.com/api-references/create-chat-completion) [[2] Create Chat Completion](https://docs.retellai.com/deploy/create-chat-completion) [[3] Create Chat](https://docs.retellai.com/api-references/create-chat) ​
### Answer The persistent 401 errors indicate an authentication issue with your public key configuration. Even though you've added the agent version, the authentication is still failing when the widget tries to access the Retell AI chat APIs [(1) ]() . Key Issues to Check: 1. Public Key Validation - Your
public_key_09a62af3307ae5254f428
may be invalid, expired, or incorrectly configured in your Retell dashboard . 2. Domain Restrictions - Your public key might be restricted to specific domains, and your current domain (
mila-chat?rc=test-site
) may not be whitelisted . 3. Agent Type Mismatch - Verify that
agent_4b09e38e1e05550570c39a142a
is actually a chat agent, not a voice agent [(2) ]() . The chat widget specifically requires a chat agent created for text conversations . Troubleshooting Steps: 1. Test Your Chat Agent Directly - Verify your agent works using the API [(3) ]() :
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: 'YOUR_RETELL_API_KEY',
}) ;

const chatResponse = await client.chat.create({ agent_id: 'agent_4b09e38e1e05550570c39a142a' }) ;
console.log(chatResponse.agent_id) ;
2. Verify Chat Completion - Test if your agent can generate responses [(1) ]() :
Copy code
javascript
const response = await client.chat.createChatCompletion({
 chat_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
 content: 'hi how are you doing?',
}) ;
console.log(response.messages) ;
Next Steps: - Check your Retell dashboard to ensure the public key is active and properly configured - Verify your domain is whitelisted for this public key - Confirm your agent ID corresponds to a chat agent, not a voice agent [(2) ]() If the API tests fail with your credentials, the issue is with your agent or key configuration. If they work but the widget doesn't, it's a domain whitelisting issue. For additional support: - Visit [Contact Sales]() - Visit [)
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
b
retell-widget.js:837 POST https://api.retellai.com/create-chat-completion 401 (Unauthorized) 6 The resource was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate
as
value and it is preloaded intentionally. @AI Evy
a
Thanks for the follow-up, @bright_07115. I'll get back to you soon.
### Answer The 401 Unauthorized error when making POST requests to ` indicates an authentication issue with your public key configuration [(1) ]() . Primary Authentication Issues to Check: 1. Public Key Configuration - Your public key needs to be properly configured with domain restrictions in the Retell dashboard . Navigate to the Public Keys section and ensure your domain is added to the allowed domains list . 2. Domain Whitelisting - The error suggests your current domain may not be authorized for your public key . You need to add domains you control to the allowed domains list . 3. Testing on localhost - If you're testing locally, you need to add
localhost
to your allowed domains list to enable development and testing on your local machine . Security Configuration Steps: To properly configure your public key : 1. Navigate to the Public Keys section in your Retell dashboard 2. Click on the public key you want to configure 3. Add your domains to the allowed domains list 4. Save your changes Additional Security Considerations: The documentation emphasizes that you should only add domains you control to the allowed domains list . For server-to-server communication, you should use API keys instead of public keys . Abuse Prevention Context: The authentication error could also be related to abuse prevention measures [(2) ]() . The documentation recommends always using public keys in frontend applications and never exposing API keys to the public . If possible, enable reCAPTCHA to prevent bots from abusing your endpoints . Recommended Next Steps: 1. Verify your domain is properly whitelisted in your public key configuration 2. Ensure you're using the correct public key format
3. Check that your agent ID corresponds to a chat agent 4. Consider implementing reCAPTCHA protection as mentioned in the security documentation [(1) ]()
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
​ To learn more, see the sources I considered: [[1] Public Keys](https://docs.retellai.com/accounts/public-keys) [[2] Prevent abuse](https://docs.retellai.com/reliability/prevent-abuse) ​
b
hello
@AI Evy i am having issue with the chatbot if it give people website link it is not clickable
a
Thanks for the follow-up, @bright_07115. I'll get back to you soon.
### Answer --- ### Answer The issue you're experiencing with non-clickable URLs in the Retell AI chat widget is a known limitation. According to a Discord community discussion, when URLs are outputted by the chat agent, they appear as plain text rather than clickable links [(1) ]() . Potential Workaround: One community member suggested asking the bot to provide responses in Markdown format . This would allow you to receive the message and decide how to display it (for example, as a clickable button or link if you're building a custom interface using the chat API) . However, when tested with a static sentence in a Conversation node, the output used Markdown format like
[Track your order](<https://www.royalmail.com/portal/rm/track?trackNumber=987654321>)
, but it still wasn't clickable in the bot widget . Current Status: The Retell team has acknowledged this as a feature request . At this time, there isn't a built-in solution to make URLs clickable directly within the embedded chat widget. Recommendations: 1. If you're using the Chat API directly (rather than the embedded widget) , you could parse the Markdown-formatted responses and render clickable links in your custom UI . 2. Monitor the Retell AI changelog for updates on this feature [(2) ]() . For additional support: - Visit [Contact Sales]() - Visit [) ---
​ To learn more, see the sources I considered: [[1] Live Chat Bot outputting URLS](https://discord.com/channels/1186424376300679209/1423251748264349779) [[2] Platform Changelogs | Retell AI](https://www.retellai.com/changelog) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
b
this are issuse i am currently facing hyperlink still not working in the chat - wont let me click on them When asked about specific people at Milberg - direct them to www.milberg.co.uk It is still producing TEMPLATES for complaints - this needs to STOP. Tell AI to not provide templates etc.jus tstivk to referring to FAQ’s library We need every chat to open or the design to read “I am not a Lawyer - I am an AI Assistant, and any information provided is for general purposes only. It should not be considered a legal advice. For guidance specific to your case, please consult a qualifies legal professional at Milberg London LLP” Recheck the use of pullets - they look messy. the answers are different each time - tell it to provide the same answer provided previously in the chat @AI Evy
a
Thanks for the follow-up, @bright_07115. I'll get back to you soon.
### Answer I'll address each of your concerns based on the available documentation: 1. Hyperlinks Not Clickable As previously discussed, this is a known limitation of the Retell AI chat widget [(1) ]() . The chat widget renders plain text, and formatted elements like clickable hyperlinks are not currently supported . Markdown or rich-text formatting that you see in other tools (like Make.com) will appear as plain text in the widget . This is a rendering issue with the widget itself, not a prompt or LLM issue . 2. Directing Users About Milberg Staff You can control this behavior through your agent's prompt [(2) ]() . Add specific instructions in your agent configuration to redirect inquiries about staff members to www.milberg.co.uk . 3. Stopping Template Generation Use your agent's prompt to explicitly prevent template generation . You can add instructions like:
Copy code
Do not provide complaint templates or form letters. Only refer users to information in the FAQ library or knowledge base.
If you have FAQ content, ensure it's loaded into a Knowledge Base linked to your agent [(3) ]() . The agent will automatically retrieve relevant information from the knowledge base during conversations . 4. Disclaimer Message You can configure this as your agent's first message or include it in the prompt instructions [(2) ]() . Add this exact disclaimer to your agent's configuration so it appears at the start of every conversation . 5. Bullet Point Formatting This relates to the same rendering limitation mentioned earlier [(1) ]() . The chat widget displays plain text, so formatted elements like bullet points may not render as expected . You may need to adjust your prompt to use simpler formatting that displays better in plain text [(2) ]() . 6. Consistent Answers To improve response consistency, consider using a Knowledge Base with your specific content [(3) ]() . When a knowledge base is linked to your agent, it will retrieve relevant information to provide more consistent responses . You can also refine your agent's prompt to be more specific about how to handle repeated questions [(2) ]() . For additional support with these configuration issues: - Visit [Contact Sales]() - Visit [)
​ To learn more, see the sources I considered: [[1] Chatbot formatting issue](https://discord.com/channels/1186424376300679209/1410337496922984518) [[2] Prompt-Based vs. Conversational Pathway | Retell AI](https://www.retellai.com/blog/prompt-based-vs-conversational-pathways-choosing-the-right-approach) [[3] Knowledge Base](https://docs.retellai.com/build/knowledge-base) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
Thanks for the follow-up, @bright_07115. I'll get back to you soon.
​ To learn more, see the sources I considered: [[1] Retell Website Widget](https://docs.retellai.com/deploy/chat-widget) ​
### Answer The issue you're experiencing with text appearing outside the chat box boundaries is a visual/CSS rendering problem with the Retell AI chat widget [(1) ]() . Potential Causes: 1. Widget Styling Conflicts - Your website's CSS may be conflicting with the chat widget's default styling . 2. Custom Color Configuration - Your
data-color="#0033FF"
attribute might be affecting text rendering in unexpected ways . 3. Long Text Without Line Breaks - If the agent generates very long words or URLs without spaces, they may overflow the container . Troubleshooting Steps: 1. Check for CSS Conflicts - Inspect your website's global CSS to see if any rules are affecting elements with IDs or classes related to the Retell widget . 2. Test with Default Settings - Temporarily remove custom styling attributes like
data-color
and
data-title
to see if the issue persists :
Copy code
html
<script
    id="retell-widget"
    src="<https://dashboard.retellai.com/retell-widget.js%22>
    type="module"
    data-public-key="public_key_09a62af3307ae5254f428"
    data-agent-id="agent_4b09e38e1e05550570c39a142a"
    data-agent-version="5"
></script>
3. Adjust Agent Prompt - Since the chat widget renders plain text only , you may need to modify your agent's prompt to avoid generating overly long responses or URLs that could cause overflow. Known Limitations: The Retell chat widget has rendering limitations for formatted content . As previously discussed in this thread, the widget displays plain text and doesn't support rich formatting like clickable links or styled bullet points . For additional support with widget display issues: - Visit [Contact Sales]() - Visit [)
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.