Skip to Content

Keys and allowed domains

The key in your widget code, and the hosts it works on.

Widgets run on your pages with a publishable key and only on the hosts in your allowed domains. Both are set up in your dashboard; nothing here needs a server.

Publishable key

The key is the data-key value in your widget code. It starts with pk_live_ and is meant to sit in your page's markup: anyone can read it, and it works only on your allowed domains.

  • One key per product. Each dashboard issues its product's key for you, in its widget code (AI Try-On one per widget). You cannot create one under Settings → API Keys.
  • Several products, one script. Put every product's key in the same data-key, separated by spaces: see Several products.
  • Never a secret key. A secret key, sk_live_…, is for your server and must not reach a page. A widget does not start with one.

API keys shows where each dashboard keeps its key, and how to list and revoke keys through the Developer API.

Allowed domains

Your account has one list of allowed domains, shared by every product and every key. A widget on a host that is not on it does not load.

  • Add each host exactly as the address bar shows it: example.com and www.example.com are two entries.
  • Add localhost while you develop, and remove it when you finish.
  • A domain you add can take a few minutes to start working.

To add one, open Settings → Domains in your dashboard: every product's dashboard shows the same list. Allowed domains gives the full rules, with examples of what each entry covers.

When a widget does not load

A widget that does not load on one host is almost always a host missing from your allowed domains, often www. or another subdomain of a host you did add. A button from the widget code also says why in the browser console: Hidden buttons lists every reason and its fix. If you installed the widget's own package rather than the widget code, see the Troubleshooting page of Room Viewer, Core AR or AI Try-On.

On this page