Authentication

People sign in in the browser; scripts and integrations send an API token.

Who How Details
Users other than Owners Single sign-on (SAML 2.0 or OIDC) through your identity provider — Google Workspace, Microsoft Entra ID, Okta or any compatible provider Setting up Single Sign-On
Owners A one-time sign-in link sent by email. It keeps working when SSO is misconfigured or your provider is down, so the workspace can always be recovered. Every workspace has at least one Owner Roles and Permissions
Scripts, integrations, the SDK and AI assistants (MCP) An API token in the Authorization header Below

Where you sign in

Every workspace lives at https://{workspace}.{region}.engeene.com (for example https://trailspark.us.engeene.com). A custom domain such as analytics.trailspark.com works too, and sign-in returns to whichever address the user started from.

Once an Owner configures single sign-on under Workspace → Authentication, users sign in with Sign in with {provider} on the sign-in page. Google and Microsoft also work without your own client credentials for a first Demo signup; for a production workspace, the Owner registers the workspace's own client so the consent screen, tenant restrictions and audit trail are yours. The browser session is kept in a secure, HTTP-only cookie and renewed while you work.

Generating API tokens

Create a token in the app under Users → Tokens (New), or with the API while signed in:

curl -X POST "https://{workspace}.{region}.engeene.com/auth/tokens" \
  -H "Authorization: Bearer YOUR_CURRENT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "nightly-load"}'
{
  "token": "eyJ...",
  "id": "4f9c2a71-…",
  "expiresAt": 1798761600,
  "domain": "trailspark.us.engeene.com"
}
  • The token is shown once — store it as a secret.
  • It carries the roles and permissions of the user who created it, including any data restrictions of those roles. Creating one needs the permission to create API tokens.
  • It is valid for 365 days (expiresAt, in epoch seconds).
  • GET /auth/tokens lists your tokens; DELETE /auth/tokens/{id} (or Revoke in the app) revokes one immediately.

Sending a token

Put it in the Authorization header of every request:

curl -X POST "https://{workspace}.{region}.engeene.com/data/ecommerce/query" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{"metrics": [{"property": "orders.revenue", "aggregation": "Sum"}]}'

A missing, expired or revoked token answers 401; a token without the needed permission answers 403. See Errors.

The desktop app never uses an API token — not for its analytics window, and not for Accelerate Other Users. It signs in as you, through your browser and your usual single sign-on — see Sign In.

Read-only workspaces

Some workspaces read their data from another workspace — every Demo workspace does. Signed in to such a workspace, nobody can change its data, whatever their role: uploads, loads and model edits are refused with 403.

Good practice

  • Use single sign-on for people — no passwords to manage in Engeene.
  • Use API tokens for automation, one per integration, and never share a browser session.
  • Rotate tokens — create a new one, switch over, revoke the old one.
  • Always use HTTPS — a token is a credential.
← API ReferenceModels Endpoint →