Skip to content
Dashboard
Open .md fileOpen llms.txtA list of every page, for AI tools

Guides

Add the widget to an app without a web address

Use the app key when your page has no web address, like an Electron app that loads its page from a file.

A page without a web address, such as an Electron app that loads its page with loadFile, has no web origin. Depending on the request, Electron sends Origin: null, Origin: file:// or no Origin at all. Iris lets such a page in only with your workspace’s app key. Copy the App key from Settings → Install and pass it next to appId:

index.html
Iris.init({ appId: "app_7Hq2xK9mPz", appKey: "app_key_4f1c9a0b2d7e4c6a8b3f5e1d9c7a2b40" });

Nothing else changes: keep loadFile, and load the SDK with the same snippet as on a website. Agent replies arrive live, as on a website.

  • The app key is public, not a secret. It ships inside your app.
  • It works for every page without a web origin: file://, a custom scheme such as app://my-app, or no Origin at all. A website always follows the allowed origins, with or without the key.
  • To identify users, call Iris.identify as on a website. Your server still signs the identity token.
  • A React Native app passes the key in the URL of the chat page. See React Native.

An admin can turn the key off or regenerate it in Settings → Install. New sessions with the old key fail at once. A contact who has the widget open keeps it for up to an hour. After you regenerate the key, release an update of your app with the new key.

If your app serves its page from its own privileged scheme, such as app://my-app, you can add that origin in Settings → Widget → Allowed origins instead of passing the key.