Your sandbox keys
Where the code samples get their keys, and how to show your own sandbox keys here while signed in to the dashboard.
Every code sample in these docs reads its keys from the server process environment, for example process. or os.. No page contains a real key, and no key is ever built into a page.
Get your keys
Section titled “Get your keys”- Sign in to the dashboard and open your sandbox environment.
- Open API keys. The secret key (
sk_test_…) stays on your server. The publishable key is the SSO client ID. - Set them in the environment of the process that runs your server, as
OHAUTHCAT_API_KEYandOHAUTHCAT_CLIENT_ID. Never put a secret key in browser code or a committed file.
The CLI can also supply credentials: ohauthcat login stores them in your OS keychain, and OHAUTHCAT_API_KEY overrides them for CI. See Install the CLI and sign in.
Show your keys while signed in
Section titled “Show your keys while signed in”If you are signed in to the dashboard in this browser, this page can show the keys of one of your sandbox environments. Enter its environment ID; a dashboard link can also pass it as ?environment=env_… in this page’s address.
- Publishable key (
OHAUTHCAT_CLIENT_ID) - Secret key (
OHAUTHCAT_API_KEY) Only the prefix is shown. Copy the full secret once from the dashboard.
What this shows, and what it never does:
- Sandbox environments only. A production environment ID is refused with
parameter_invalid, and nothing is shown. - The newest live keys. The publishable key is shown in full; it is the SSO client ID and safe in a browser. For the secret key, only its prefix followed by
••••is shown, never the secret itself. Copy the full secret once from the dashboard’s API keys page. - Viewers see the publishable key only. The secret key prefix needs the developer role or higher.
- In your browser, at the time you ask. The page asks the API for them with your dashboard session. Keys are never built into a page, never stored, and the code samples on other pages keep their environment variable names. The page remembers only the environment ID, in this browser.
- Your account only. An environment of another account reads as not found.
- Not during an outage. The route is never served by the standby API, so during a failover this page cannot show keys; use the values you already set in your server’s environment.
The same keys are on the dashboard’s API keys page, where you also revoke them; ohauthcat keys revoke prints its link.