Skip to content

Domain not allowed

A 403 Forbidden on widget/config or widget/messages almost always means the browser’s Origin header does not match your deployment’s allowed domain list.

Browser DevTools → Network → click the failed request:

FieldBlocked example
Status403
URLhttps://api.chatevo.ai/api/v1/widget/config?deployment_id=…
Request headerOrigin: https://shop.example.com
Response body{ "error": { "code": "domain_not_allowed" } }
  1. Deployments → Web widget → Security → Allowed domains.
  2. Add the exact origin from the Origin header (scheme + host + port).
  3. Save.
  4. Hard-refresh the page (Cmd+Shift+R / Ctrl+Shift+R).
Your site URLAllowlist entry
https://www.example.comhttps://www.example.com
https://example.comhttps://example.com (separate from www)
https://app.example.comhttps://*.example.com or exact subdomain
http://localhost:5173http://localhost:5173 (staging only)

https://*.example.com matches any single subdomain:

  • https://app.example.com
  • https://staging.example.com
  • https://example.com (apex — add separately)
  • https://deep.app.example.com (only one level)
Terminal window
curl -s -o /dev/null -w "%{http_code}" \
"https://api.chatevo.ai/api/v1/widget/config?deployment_id=dep_YOUR_ID" \
-H "Origin: https://www.yourbusiness.com"

Expect 200. Change the Origin value to match each domain you need.

IssueDifference
Wrong deployment ID404 not 403
Archived deployment404 or deployment_inactive
API key in widget callWidget does not use API keys — remove Authorization header from custom code

Each environment needs its own entry:

EnvironmentTypical origin
Vercel previewhttps://project-abc-team.vercel.app
Netlify branchhttps://deploy-preview-42--site.netlify.app
Staginghttps://staging.example.com

Consider a separate staging deployment with relaxed localhost entries.