Skip to content
OAOpenAppPhysical Security as a Service
Login

Authentication

OpenApp SDKs authenticate with API keys in the encoded form described in API keys. The token embeds the API base URL; each SDK parses it and configures HTTP unless you override the base URL where the binding supports it.

For Python-only topics (rotation snippets, repr privacy), see Python — Authentication.

  1. Sign in to the OpenApp dashboard.
  2. Open Resources → API Keys.
  3. Create a key, set expiry, and copy the token once.

Creating keys requires the api_keys:create role in the target organization.

Pass the full token string (including the https://…/api/v1_openapp_… prefix).

from openapp_sdk import Client
client = Client.connect(
api_key="https://api.openapp.house/api/v1_openapp_YOUR_SECRET",
)

Go: NewAPIClient uses CGO and the core C bridge; call Close when finished so native runtime handles are released.

Rust / TypeScript: Prefer one long-lived client per process and reuse it (clone in Rust; keep a single AsyncClient in Node).

Use this when the token’s embedded host does not match the server you need (staging, proxy, or on‑prem).

client = Client.connect(
api_key="https://api.openapp.house/api/v1_openapp_YOUR_SECRET",
base_url="https://staging.example.com/api/v1",
)

None of the SDKs read OPENAPP_API_KEY (or similar) by default — configure explicitly or wrap yourself:

import os
from openapp_sdk import Client
def client_from_env() -> Client:
return Client.connect(api_key=os.environ["OPENAPP_API_KEY"])

Key lifecycle over the wire is documented in the API reference under API Keys — for example POST /api-keys, revoke, restore, and purge. Language surfaces differ (client.api_keys in Python, APIKeysAPI in Go, etc.); map tags from the OpenAPI document to your SDK.

Browser sessions (Kratos) — introspection (GET /auth/whoami, GET /auth/session, …) and cookie logout are under the Auth tag; see Auth (browser session).

SymptomLikely cause
Invalid token formatMissing _openapp_ separator — copy the full dashboard token.
Cannot derive base URLMalformed URL prefix; set base_url explicitly (Python / Rust) or mint a key for that host.
401 UnauthorizedRevoked or expired key, wrong org, or wrong backend.