Tubussie
01/16/2026, 10:49 AMAI Evy
01/16/2026, 10:49 AMAI Evy
01/16/2026, 10:49 AMget-chat/undefined error typically means the widget never creates a chat ID, so Retell isn't reaching authentication yet. [(1) ]()
Common causes:
- Missing or incorrect agent ID — The widget config may not have the agent ID properly set
- Wrong environment configuration
- WordPress loading the script before the config — Very common with caching or defer settings
Domain/origin mismatch:
Based on a previous conversation you had, if your chatbot is running on vireonai.co.za/wp/ but only vireonai.co.za is in your allowed domains, this will cause a 401 error on create-chat. Retell checks the exact origin where the chat is loaded from.
Troubleshooting steps:
1. Open DevTools and check the failed request to see the exact Origin/Referer being sent
2. Verify your agent ID is correctly configured in the widget initialization
3. Check your allowed domains in the Retell dashboard match exactly where the widget is loaded from
4. If using WordPress, ensure the widget script loads after the configuration is set (check for caching/defer issues)
Could you confirm what Origin/Referer shows on the failed request in your browser's Network tab?AI Evy
01/16/2026, 10:49 AMAI Evy
01/16/2026, 10:49 AMTubussie
01/16/2026, 10:54 AMAI Evy
01/16/2026, 10:54 AMAI Evy
01/16/2026, 10:54 AMapi.retellai.com or similar) . The get-chat/undefined error mentioned earlier would appear on a Retell endpoint, not a WordPress /wp-json/ endpoint.
For the Retell Chat Widget specifically:
1. Ensure your public key is configured with the correct allowed domains in your Retell dashboard
[(2) ]()
2. Add both vireonai.co.za and vireonai.co.za/wp (or use localhost for local testing) to your allowed domains list
3. Verify your agent ID is correctly set in the widget initialization code
[(1) ]()
Filter your Network tab to show only requests to Retell's domain and share that specific error—the WordPress 401 you shared is a separate issue from your chatbot integration.AI Evy
01/16/2026, 10:54 AMAI Evy
01/16/2026, 10:54 AM