1
Choose an authentication mode
Decide whether you want API key authentication (best for automation) or session authentication (required for settings management).
2
API key authentication
The default and most common mode. Figranium sends the key as Only
Authorization: Bearer <key>.Switching headers
Some deployments expectx-api-key instead of the Authorization header. Set apiKeyHeader: "x-api-key":"authorization" (default) and "x-api-key" are valid values.What API keys can access
API keys authenticate every task, execution, schedule, capture, credential, browser, and execution endpoint. They cannot callsettings.* endpoints, which require a user session.3
Browser session authentication
Set Session mode is required for anything under In the browser, cookies are handled natively; no extra setup is needed.
session: true to authenticate with cookies. The SDK sets credentials: "include" so cookies are attached to every request.settings (API key management, AI providers, theme, user agent, and proxies).Node.js and cookie jars
Node’s built-infetch does not persist cookies between requests. If you need to drive session endpoints from Node, provide a cookie-aware fetch implementation via the fetch option:First-time server setup
If Figranium has not been initialized yet, useauth.checkSetup() and auth.setup() to create the first user. This does not require any credentials.
Rotate an API key
Session-authenticated admins can rotate keys throughsettings.setApiKey:
setApiKey to set a specific value instead of generating one.
Related
Client configuration
All available client options, including
baseUrl and timeoutMs.Settings resource
Session-only endpoints for API keys, AI providers, theme, and proxies.