You typically need both.
flows.run and feedback are authenticated by the trigger secret; everything else keys off the PAT.
Initialise the client
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: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. Aread 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):Environment overrides
Standard env vars the SDK reads with no code change:NORA_PAT— read intotokenif you leave it off thecreateClientcall.NORA_TRIGGER_SECRET— same fortriggerSecret.NORA_BASE_URL— overridesbaseUrl(default:https://platform.nora.my/api/v1).NORA_TENANT— overridestenantif you leave it off.
.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.