bright_07115
10/22/2025, 6:22 PMAI Evy
10/22/2025, 6:22 PMAI Evy
10/22/2025, 6:22 PMhtml
<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) ]() :
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.AI Evy
10/22/2025, 6:23 PMAI Evy
10/22/2025, 6:23 PMbright_07115
10/22/2025, 6:23 PMbright_07115
10/22/2025, 6:24 PMAI Evy
10/22/2025, 6:24 PMAI Evy
10/22/2025, 6:24 PMdata-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:
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>AI Evy
10/22/2025, 6:24 PMAI Evy
10/22/2025, 6:24 PMAI Evy
10/22/2025, 6:24 PMdata-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.bright_07115
10/22/2025, 6:28 PMAI Evy
10/22/2025, 6:28 PMAI Evy
10/22/2025, 6:28 PMjavascript
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) ]() :
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.AI Evy
10/22/2025, 6:28 PMAI Evy
10/22/2025, 6:28 PMbright_07115
10/23/2025, 11:16 PMAI Evy
10/23/2025, 11:16 PMAI Evy
10/23/2025, 11:16 PMdata-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?AI Evy
10/23/2025, 11:16 PMAI Evy
10/23/2025, 11:16 PMbright_07115
10/23/2025, 11:17 PMAI Evy
10/23/2025, 11:17 PMAI Evy
10/23/2025, 11:17 PMdata-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?AI Evy
10/23/2025, 11:17 PMAI Evy
10/23/2025, 11:17 PMbright_07115
10/23/2025, 11:24 PMbright_07115
10/23/2025, 11:26 PMAI Evy
10/23/2025, 11:26 PMAI Evy
10/23/2025, 11:27 PMdata-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.AI Evy
10/23/2025, 11:27 PMAI Evy
10/23/2025, 11:27 PMbright_07115
10/23/2025, 11:29 PMAI Evy
10/23/2025, 11:29 PMAI Evy
10/23/2025, 11:29 PMAI Evy
10/23/2025, 11:29 PMpublic_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) ]() :
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) ]() :
javascript
const response = await client.chat.createChatCompletion({
chat_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
content: 'hi how are you doing?',
}) ;
console.log(response.messages) ;AI Evy
10/23/2025, 11:30 PMAI Evy
10/23/2025, 11:30 PMbright_07115
10/23/2025, 11:35 PMas value and it is preloaded intentionally.
@AI EvyAI Evy
10/23/2025, 11:35 PMAI Evy
10/23/2025, 11:35 PMlocalhost 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 formatAI Evy
10/23/2025, 11:35 PMAI Evy
10/23/2025, 11:35 PMbright_07115
11/04/2025, 9:19 PMbright_07115
11/04/2025, 9:20 PMAI Evy
11/04/2025, 9:20 PMAI Evy
11/04/2025, 9:21 PM[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 [)
---AI Evy
11/04/2025, 9:21 PMAI Evy
11/04/2025, 9:21 PMbright_07115
11/04/2025, 9:25 PMAI Evy
11/04/2025, 9:25 PMAI Evy
11/04/2025, 9:26 PMDo not provide complaint templates or form letters. Only refer users to information in the FAQ library or knowledge base.AI Evy
11/04/2025, 9:26 PMAI Evy
11/04/2025, 9:26 PMAI Evy
11/04/2025, 9:26 PMbright_07115
11/05/2025, 7:17 PMAI Evy
11/05/2025, 7:17 PMAI Evy
11/05/2025, 7:18 PMAI Evy
11/05/2025, 7:18 PMdata-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 :
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 [)AI Evy
11/05/2025, 7:18 PM