Keys and security
A storefront built with the Storefront SDK calls the GraphQL API with API keys. This page covers which keys a storefront needs, where each one goes and what to check before the storefront goes live. It applies to every approach: a scaffolded boilerplate and your own app alike.
Checked against create-propeller-shop 0.11.2, the boilerplates of 18 October 2026 and @propeller-commerce/propeller-sdk-v2 0.18.0.
The two keys
You create API keys in the Backoffice (see Environments and access). A storefront uses two:
| Key | What the storefront uses it for | What it may do |
|---|---|---|
| API key | Every catalog, cart, checkout and account call | Only what a storefront needs |
| Order-editor API key | Order actions the storefront key may not run: setting the order status after a payment, sending a password reset link, sending the quote request and order confirmation emails, reading a just-placed order. With PunchOut, also reading the buyer Contact's shared secret and creating its sign-in token | Only these actions |
Never use an admin key in a storefront. The storefront's GraphQL route adds its key to the requests that visitors' browsers send, so whatever the storefront's keys may do, a visitor can do too. Keys limited to the storefront's own work keep that harmless.
How the GraphQL route uses the keys
The browser never calls Propeller directly. It posts every GraphQL request to the storefront's own route, /api/graphql, which runs on the server:
Browser /api/graphql (your server) Propeller GraphQL API
─────── ────────────────────────── ─────────────────────
POST /api/graphql → adds the API key
and the user's access token → answers with data
← passes the response back ←
The SDK client posts to this route in its default proxy mode, and it sends no key itself. When a user signs in, the route forwards their access token with each request, so the API answers with their prices and their data.
The keys live in server-only settings:
| Stack | API key | Order-editor API key |
|---|---|---|
| Next.js | BOILERPLATE_API_KEY | BOILERPLATE_ORDER_EDITOR_API_KEY |
| Nuxt | BOILERPLATE_API_KEY | BOILERPLATE_ORDER_EDITOR_API_KEY |
| Vue | SSR_API_KEY | SSR_ORDER_EDITOR_API_KEY |
In your own app you write this route yourself. Add the SDK to your app shows a minimal one. Keep the order-editor key out of it: run order actions, such as the status update after a payment, in your own server code. The payment providers work that way.
Before you deploy
- Keys. Use the two keys above, limited as described, and set them in your host's secret store. Never an admin key.
- The behavior dashboard. The boilerplates include a dashboard at
/trackerthat shows the activity and revenue of every Company that uses the shop, with its data endpoint at/api/tracker. Put both behind your own sign-in check before you deploy, or remove them. - The refresh endpoint. Set
REVALIDATE_SECRETto a long random value. The endpoint refuses requests without a matchingX-Revalidate-Secretheader. See Routing. - Payments. Payment provider keys stay on the server, and the webhook needs a public URL. See Payment providers.
See also
- Add the SDK to your app for a minimal GraphQL route
- Deployment for the settings to set before you build
- Authentication and authorization for how users sign in
- Environments and access for creating API keys