Skip to content

OAuth & service accounts

For automated systems that need to act without a human user present — such as UiPath robots, CI pipelines, or microservices — Stackify supports OAuth 2.0 Client Credentials authentication via service accounts.

When to use service accounts vs API keys

API keys Service accounts
Best for Simple scripts, Zapier, n8n UiPath, enterprise automation, server-to-server
Auth flow Static bearer token OAuth 2.0 client credentials grant
Token rotation Manual Automatic (short-lived tokens)
Identity Workspace-scoped anonymous Named service account with a workspace role

Create a service account

  1. Go to SettingsIntegrationsService accounts.
  2. Click Create service account.
  3. Enter a name (e.g. "UiPath robot" or "ETL pipeline").
  4. The service account is assigned a Client ID and Client Secret.
  5. Copy the Client Secret now — it will not be shown again.

Obtain an access token

Exchange your Client ID and Client Secret for a short-lived access token:

curl -X POST https://auth.stackify.se/realms/stackify/protocol/openid-connect/token \
  -d "grant_type=client_credentials" \
  -d "client_id=YOUR_CLIENT_ID" \
  -d "client_secret=YOUR_CLIENT_SECRET"

Response:

{
  "access_token": "eyJ...",
  "expires_in": 300,
  "token_type": "Bearer"
}

Use the token

Include the access token in the Authorization header, just like an API key:

Authorization: Bearer eyJ...

Tokens expire after 5 minutes. Your application should request a new token before it expires.

UiPath integration

Stackify's OpenAPI specification (GET /api/v1/openapi.json) is built for use with UiPath Connector Builder. See UiPath for a step-by-step integration guide.

Revoke a service account

  1. Go to SettingsIntegrationsService accounts.
  2. Click Revoke next to the account.

Revoking a service account immediately invalidates all its tokens. Any active automation using it will fail until reconfigured.