Documentation
¶
Overview ¶
Command list-event-types is the smallest possible FlowCatalyst SDK example. It builds a *client.FlowCatalystClient against a platform URL, calls EventTypes().List, and prints the result.
Two auth flavors are shown:
- Static bearer token (set via FC_TOKEN env). Fine for scripts.
- OAuth2 client_credentials (set FC_CLIENT_ID + FC_CLIENT_SECRET
- FC_ISSUER). The TokenProvider caches tokens until 60s before expiry and refreshes on demand — wire this for long-running services.
Run ¶
FC_BASE_URL=https://api.flowcatalyst.io \ FC_TOKEN=eyJ... \ go run ./examples/list-event-types
Or with client credentials:
FC_BASE_URL=https://api.flowcatalyst.io \ FC_ISSUER=https://auth.flowcatalyst.io \ FC_CLIENT_ID=svc-app \ FC_CLIENT_SECRET=... \ go run ./examples/list-event-types
Click to show internal directories.
Click to hide internal directories.