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¶
- Go to Settings → Integrations → Service accounts.
- Click Create service account.
- Enter a name (e.g. "UiPath robot" or "ETL pipeline").
- The service account is assigned a Client ID and Client Secret.
- 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:
Use the token¶
Include the access token in the Authorization header, just like an API key:
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¶
- Go to Settings → Integrations → Service accounts.
- Click Revoke next to the account.
Revoking a service account immediately invalidates all its tokens. Any active automation using it will fail until reconfigured.