OrbitSpaceDocs
Build integrations

Authentication and access

Choose an identity for the application and keep its permissions, tenant scope and network policy explicit.

Choose a credential type

Use caseRecommended starting point
Personal scriptsA scoped personal API Token
CI or bootstrap automationA Service Account with a scoped API Token
Product backendAn OAuth client using Client Credentials
Browser or native applicationAuthorization Code with PKCE; OIDC when identity is required

Register applications and manage credentials in Console's application integration settings. Team membership and resource authorization still apply after authentication.

API Tokens

Read GET /api/v1/api-token-policy for the team's permitted expiry choices. Issuance accepts a duration, an absolute expiration or no expiration when policy allows it. Use bounded lifetimes for automation where practical. Optional allowed IP ranges restrict IPv4/IPv6 addresses and CIDRs.

bash
curl --fail-with-body https://api.orbitspace.dev/api/v1/agent-deployments \
  -H "Authorization: Bearer $ORBITSPACE_API_TOKEN" \
  -H "X-OrbitSpace-Tenant: $ORBITSPACE_TENANT_ID"

Copy a newly issued credential once into a secret manager. Revoke unused credentials. Changing a token's allowed network range does not add resource permissions.

OAuth for a backend

Register a confidential client, its scopes and resource audience. Protect its client secret on the server. The example uses HTTP Basic client authentication; select the authentication method actually registered for your client.

bash
curl --fail-with-body https://api.orbitspace.dev/oauth2/token \
  -u "$ORBITSPACE_CLIENT_ID:$ORBITSPACE_CLIENT_SECRET" \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  --data-urlencode grant_type=client_credentials \
  --data-urlencode scope='invocations:read invocations:write' \
  --data-urlencode resource=https://api.orbitspace.dev

Use the returned short-lived access token for the authorized API requests. Do not embed client secrets in browser code. Asymmetric private_key_jwt authentication is available for clients configured with an accepted public JWK Set.

Browser applications and OIDC

Public clients use Authorization Code with PKCE S256 and an exact registered redirect URI. Generate a fresh verifier and state value for each authorization. Request openid when using OIDC and validate the ID Token's signature, issuer, audience, expiry and nonce.

Use the deployment's OAuth/OIDC discovery metadata for advertised endpoints and supported capabilities. Do not treat an ID Token as an API access token or reuse a backend client secret in a public client.

Pick scopes deliberately

Use Console's scope selector and resource policies. Common scopes include tasks:read, tasks:write, approvals:read, approvals:write, artifacts:read, invocations:read and invocations:write. Goal Experience uses Task scopes; goals.read and goals.write are not supported scope names.

For client-credentials network restrictions, configure the client's allowed IP ranges. They apply to token exchange and subsequent API access. Interactive OAuth clients use their own login and authorization flow rather than a machine IP policy.