Reference

CORS and allowed origins

Match the browser's exact origin to the verified project configuration. A domain name and an app URL serve different purposes.

App URL and approved origins

An app URL identifies the page, such as https://www.example.com/chat. Its origin is https://www.example.com, with no path, query or fragment.

www.example.com and example.com are distinct hosts. Add and verify both only if both serve your app. HTTPS, HTTP and different ports are distinct origins. A bare domain normalized by Dashboard does not automatically authorize www, subdomains or a new protocol.

Save verified origins for the same project. Existing integrations are not silently migrated. If a project is incomplete, finish its settings before copying new generated files.

Server package and direct REST

The server package's publicOrigins checks browser-to-your-backend requests. Copy the saved exact HTTPS origins. Add an exact loopback origin to your local server ENV only for local development.

Direct server-to-server REST does not make the secret safe for the browser. Keep every sk_ credential on the server. A publishable key belongs only to the separate browser activation flow.

Diagnose an origin error

Compare the actual address bar origin, selected project and saved list. A successful OPTIONS preflight does not authorize the following request. Keep request-level checks enabled. Do not solve a mismatch with a wildcard or by removing authentication.

Authentication →

Need help with your integration?

Share the affected endpoint, request ID, and the behavior you expected. Leave out keys and user content.

Contact the team