Skip to content

Register an application and get credentials

An application is how the platform knows your software: it owns event types, roles, subscriptions, scheduled jobs and documentation, and it holds the credentials your code uses. See applications and integrations for the model. This page creates one and collects its credentials.

Terminal window
fcdev init --code orders --name "Orders"

This does everything on this page at once against the local fcdev: it creates the application, reuses or creates the default client, provisions the service account and writes FLOWCATALYST_BASE_URL, FLOWCATALYST_APP_CODE, FLOWCATALYST_CLIENT_ID, FLOWCATALYST_CLIENT_SECRET, FLOWCATALYST_SIGNING_SECRET and FLOWCATALYST_WEBHOOK_AUTH_TOKEN (plus the local FLOWCATALYST_APP_KEY) to ./.env. The last two are the webhook credentials described under the signing secret, so a local application needs no Regenerate Secret step. See fcdev day to day for its flags.

Creating applications and provisioning their service accounts is an anchor administrator’s job. Ask yours, or, if that is you, in the console:

  1. Applications, New: the code (a short, URL-safe slug that prefixes everything the application owns, for example orders; it cannot change later), the name, the type and, optionally, the default base URL where it is deployed.
  2. On the application’s page, Provision Service Account. Copy the client id and client secret now: the secret is stored as a hash and shown only once.

The same through the API:

POST /api/applications
{ "code": "orders", "name": "Orders", "type": "APPLICATION" }
→ 201 { "id": "app_..." }
POST /api/applications/app_.../provision-service-account
→ 201 { "serviceAccount": { "principalId": "prn_...", "name": "...",
"oauthClient": { "id": "oac_...", "clientId": "...", "clientSecret": "..." } } }

Application or integration. Choose APPLICATION for software people sign in to (it is offered when creating login clients), INTEGRATION for a connector that moves data (it can own ingestions). An application can become an integration at any time; the reverse is refused while it owns ingestions.

The provisioned account is a service principal with the platform:application-service role, confined to this one application: the platform checks the application of everything it touches, and its tokens carry an applications claim naming only this application. With it your code can:

  • sync the application’s definitions (roles, event types, pools, connections, subscriptions, processes, scheduled jobs, OpenAPI, docs) and push rules;
  • publish events, dispatch jobs and audit entries for its application (the outbox relay uses it);
  • read and fire its own scheduled jobs and report their instances;
  • read and write its own platform configuration, and reveal its secrets (audited);
  • read its own events, dispatch jobs and users for admin pages.

It cannot publish another application’s event types (refused with 400), and it cannot use the general admin APIs. Give it extra roles only with care: its secret is in your deployment.

The service account also has webhook credentials: an HMAC signing secret and a bearer token that the platform puts on deliveries signed by this account (deliveries through the application’s own connections, and its scheduled-job firings). They are generated at provisioning and never shown. To get a value to configure your receiver with, open Service accounts, the application’s account (named after the application, for example “Orders Service Account”, with the code app:<code>), and Regenerate Secret under Signing Secret (HMAC-SHA256); or POST /api/service-accounts/{id}/regenerate-signing-secret. See receive deliveries.

With fcdev init you do not need this step: it writes FLOWCATALYST_SIGNING_SECRET (the HMAC secret) and FLOWCATALYST_WEBHOOK_AUTH_TOKEN (the bearer token) to .env when it creates the application. For an application that already exists, fcdev init --code orders --regenerate-signing-secret replaces the service account’s signing secret and writes the new one. A running copy of the application that verifies with the old secret refuses every delivery until it is restarted with the new one.

Reading the account back. GET /api/applications/{id}/service-account returns the service account attached to an application (the same shape as GET /api/service-accounts/{id}, with its principal id and OAuth client id, never a secret). It needs read access to the application and the service-account view permission; an application with no account, or one the caller may not view, answers 404.

If users sign in to your application through FlowCatalyst, it also needs a login client (authorization code with PKCE): Provision Login Client on the application’s page, or POST /api/applications/{id}/provision-login-client. See use FlowCatalyst as your app’s identity provider.

Users of a client (tenant) can be given your application’s roles only when the client is entitled to the application (a client config). An administrator enables it per client: see onboard a client and entitle applications.

The SDKs read the same variable names by convention:

Variable Value
FLOWCATALYST_BASE_URL The platform’s URL, for example https://platform.example.com
FLOWCATALYST_APP_CODE The application’s code
FLOWCATALYST_CLIENT_ID The service account’s OAuth client id
FLOWCATALYST_CLIENT_SECRET Its secret
FLOWCATALYST_SIGNING_SECRET The signing secret, for verifying deliveries
FLOWCATALYST_WEBHOOK_AUTH_TOKEN The bearer token the platform sends with deliveries (written by fcdev init)

Keep the secrets in your secret manager, one set per environment. Codes are the same in every environment; ids and secrets are not.

Rotating. Regenerate the OAuth client’s secret under OAuth clients (or the service account’s page) and deploy the new value; tokens already minted stay valid until they expire (an hour by default). Regenerating the signing secret takes effect for deliveries at once; see rotate the secret.

Publishing the credentials to AWS Parameter Store. The platform can write a service account’s or OAuth client’s credentials to Parameter Store for you whenever they are created or rotated: see publish credentials to AWS Parameter Store.

Developers testing against a shared platform

Section titled “Developers testing against a shared platform”

A developer who needs to call a shared test platform from their machine should not borrow the application’s service account. Give them the platform:developer role instead (Developer users in the console): they can then set a self-service API credential from their profile and call the API through the client-credentials grant as themselves, with client_id set to their own principal id (prn_...) and their personal secret, holding only the roles they hold. Revoking the role makes the credential useless at the next token request.