Skip to main content
Requests to the StoreRouter Platform Catalog API require a valid API key. Keys are issued per organization through StoreRouter Platform. Developer API keys can search and browse every active crawled catalog and can never access merchant catalogs. This page explains the key format, how to configure your environment, and what to do when authentication fails.

API key format

StoreRouter Platform API keys follow this structure:
Keep your key private. Do not commit it to source control or expose it in client-side code. For the StoreRouter CLI, prefer STOREROUTER_API_KEY. The CLI also accepts OCTOGEN_PLATFORM_API_KEY as a compatibility fallback and OCTO_API_KEY as a deprecated fallback. The SDK environment variable remains OCTOGEN_PLATFORM_API_KEY.

Set up your API key

1

Create a key in StoreRouter Platform

Log in to StoreRouter Platform and navigate to API Keys. Generate a new key and copy it immediately — the secret portion is only shown once.
2

Set the environment variable

Add your key to your environment so the SDKs and CLI can pick it up automatically:
For long-lived deployments, set this in your server’s secrets manager or environment configuration rather than in shell profiles.
The SDKs still accept the older OCTO_API_KEY variable as a deprecated fallback when OCTOGEN_PLATFORM_API_KEY is not set. The Python SDK raises a DeprecationWarning, and the TypeScript SDK warns once. Support will be removed, so rename the variable to OCTOGEN_PLATFORM_API_KEY.
3

Verify the setup

Confirm the key works with a small product search:
A successful response returns an items array. Catalog enumeration is not required to search across the policy-wide crawled catalog set.

Attach the key to requests

Send the key as a Bearer token in the Authorization header on every API request:

SDKs handle this automatically

If you use the Python or TypeScript SDK, authentication is handled for you. The client reads OCTOGEN_PLATFORM_API_KEY from the environment by default, or you can pass the key explicitly:

Rotate and revoke keys

Rotate keys from the API Keys section of StoreRouter Platform. When you deactivate a key, it is revoked immediately — the next request using that key returns a 401 error. Issue a replacement key before deactivating the old one to avoid downtime.
Deactivating a key takes effect on the next API request. There is no grace period. Always create and deploy a replacement key before revoking the old one.

Error reference

API keys are organization-scoped. Search/browse access for Developers covers active crawled catalogs only. BigQuery listing access remains separately granted.