Skip to content

API Authentication

Flow APIs use Bearer token authentication.

Getting a Token

Use the OIDC flow to obtain an access token:

  1. Redirect to Zitadel authorization endpoint
  2. User authenticates
  3. Exchange code for token
  4. Use token in API requests

Option 2: Personal Access Token

Request a personal access token from your administrator.

Using the Token

Include the token in the Authorization header:

curl -X GET "https://admin.flow.labpgx.com/api/v1/organizations" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
import httpx

headers = {"Authorization": "Bearer YOUR_ACCESS_TOKEN"}
response = httpx.get(
    "https://admin.flow.labpgx.com/api/v1/organizations",
    headers=headers
)

Token Expiration

Access tokens expire after 1 hour. Use refresh tokens to obtain new access tokens without re-authenticating.

Error Responses

Status Description
401 Missing or invalid token
403 Token valid but insufficient permissions