Skip to main content
The SDK carries two credentials, both server-side: You typically need both. flows.run and feedback are authenticated by the trigger secret; everything else keys off the PAT.

Initialise the client

Full ClientOptions reference (base URL, retries, logging, custom fetch, custom trigger header) lives on the next page: Client options.

Where credentials come from

Trigger secret

Minted on the Flow’s trigger block. Generate it in the app (Trigger → Generate secret) or via CLI:
The plaintext is printed to stdout once — copy it into your secret manager immediately. There is no “print again” path; if you lose it, rotate again. Each Flow has its own secret. A leaked secret compromises only that one Flow.

Personal access token (PAT)

Mint under Settings → Personal Access Tokens in the app. When you create it, select the exact scopes you need — the token is granted the union of what you tick. The token is shown once; store it in your secret manager and reference via env var:

PAT scopes (enforced)

Scopes are strictly enforced server-side. A read token can’t approve; a simulate token can’t write memory. approve and simulate are separate from read so a leaked read token can’t ship changes or spend money.

Least-privilege recipes

Read-only integration (dashboards, “why did this answer” panels):
Improvement-queue embed (surface fixes to your admins):
Full loop, including on-demand simulation:
Content writes (uploads, memory writes from app code):
Mint separate tokens per role rather than one broad token. Rotating a compromised token then costs one path, not everything.

Environment overrides

Standard env vars the SDK reads with no code change:
  • NORA_PAT — read into token if you leave it off the createClient call.
  • NORA_TRIGGER_SECRET — same for triggerSecret.
  • NORA_BASE_URL — overrides baseUrl (default: https://platform.nora.my/api/v1).
  • NORA_TENANT — overrides tenant if you leave it off.
Local .env files aren’t loaded automatically — use dotenv or your framework’s env loader.

Next

  • Client options — the full options surface (timeouts, retries, logger, custom fetch, trigger header override).
  • Execution — start calling Flows.
  • Errors — how auth failures surface and what to catch.