Skip to Content
Appwright
Features

Secrets

Store API keys and tokens, and enable them per worker

Secrets store third-party API keys and tokens for your workers to use. They are write-only: once saved, a value can never be read back — not by you, not by the app — and values are never stored in Bound’s database. Secrets live as encrypted bindings on your store’s own Cloudflare infrastructure; the app can only ever list their names.

Adding a secret

From the Secrets page, click Create secret and provide:

  • Name — how your code refers to the secret. Letters, numbers, and underscores, starting with a letter or underscore (for example SLACK_WEBHOOK_URL). Names must be unique, and a small set of names is reserved for platform use (see below).
  • Value — the secret itself. It’s write-only the moment you save.

The Secrets page lists every secret by name, whether it’s in use, and which workers use it.

Editing a secret

A secret’s name is its identifier and can’t be changed — renaming means deleting and recreating. Editing a secret overwrites its value: the edit dialog takes a new value only, and the current one is never displayed.

Removing a secret

Deleting a secret removes it from your store’s live infrastructure immediately. Workers that had it enabled stop receiving it on their very next request — the delete action sits inside the secret’s edit dialog under a warning that spells this out, and it can’t be undone.

A deleted secret’s name may linger in a worker’s enabled list until that worker is next saved (the stale entry resolves to nothing at runtime and is pruned on save). Before deleting, check the secret’s “Used by” list on the Secrets page.

Enabling secrets on a worker

Creating a secret gives no worker access to it. On each worker’s page, the Secrets section lists your shop’s secrets with checkboxes; enabled secrets appear as removable chips. Changes are drafts committed with the page’s save bar, like any other edit.

At runtime the worker receives only its enabled secrets, readable by name:

const apiKey = this.ctx.props.secrets.MY_API_KEY;

Enablement takes effect without any redeploy — it’s resolved per request. The worker page warns you about enabled secrets your code never references, and the code editor flags the reverse: references to secrets that don’t exist or aren’t enabled on this worker.

Platform secrets

Bound manages a few secrets of its own on your store’s infrastructure — SHOPIFY_SHOP_DOMAIN, SHOPIFY_APP_PRIVATE_KEY, and SHOPIFY_STOREFRONT_ACCESS_TOKEN. These are reserved: they can’t be used as names for your own secrets, they don’t appear on the Secrets page or in the worker’s secret picker, and they are never passed to worker code.

The Storefront token powers this.ctx.props.storefront. It’s provisioned automatically on install; from Settings → Storefront API Tokens you can generate it if it’s missing or rotate it (rotation creates a new token, updates the secret, and deletes the old one).