Skip to Content

Authentication

Preview

Authenticate server-to-server with workspace API keys, or act on behalf of a user with Rexplore ID OAuth.

Preview

This feature is in preview. The contract documented here is stable enough to build against, but details may still change before general availability.

The Luso8 API supports two ways to authenticate. Pick the one that matches who is acting.

MethodActs asBest for
API keyYour workspaceBackends, scheduled jobs, integrations you run on a server
Rexplore ID OAuthA signed-in userApps where each person signs in with their own Rexplore ID, and MCP clients

API keys

An API key belongs to exactly one workspace and carries a set of scopes. Every request made with the key reads and writes that workspace's data only.

Send the key in the Authorization header as a bearer token:

curl https://api.luso8.rexplore.ai/api/v1/contacts \
  -H "Authorization: Bearer luso8_sk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

If your HTTP client or proxy makes the Authorization header awkward, send the same key in X-API-Key instead:

curl https://api.luso8.rexplore.ai/api/v1/contacts \
  -H "X-API-Key: luso8_sk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

Create and manage keys in Settings›Developers›API keys. See API keys for formats, rotation and best practices.

Keep keys on the server

An API key grants access to your whole workspace within its scopes. Never put it in a browser bundle, a mobile app, a public repository or a URL. Store it in a secret manager or environment variable and call Luso8 from your backend.

Rexplore ID OAuth

When your app acts for a specific person, have them sign in with Rexplore ID, the account system behind every Rexplore product. Rexplore ID is a standard OpenID Connect provider:

  • Issuer: https://auth.rexplore.ai
  • Flow: authorization code with PKCE (S256)
  • Tokens: short-lived RS256 JWT access tokens, rotating refresh tokens with offline_access

Send the user's access token exactly like an API key:

curl https://api.luso8.rexplore.ai/api/v1/contacts \
  -H "Authorization: Bearer eyJhbGciOiJSUzI1NiIs..."

Requests made with a user token run with that user's permissions in their active workspace. The endpoints, discovery document and token lifetimes are documented in Rexplore ID for developers.

AI tools that connect to the remote MCP server use this flow automatically, with dynamic client registration.

Scopes

API keys are limited to the scopes you choose when you create them. Each scope is <resource>:read or <resource>:write.

RuleMeaning
contacts:readRead-only access to one resource (GET requests)
contacts:writeCreate, update and delete on that resource. Write implies read.
*Full access to every resource, now and in the future

The resources are contacts, companies, deals, leads, lists, campaigns, conversations, calls, appointments, tickets, agents, knowledge, workflows and reports. Each endpoint in the API reference states the scope it requires.

A request without the needed scope fails with 403:

{ "detail": "Missing scope: contacts:write" }

Authentication errors

StatusBodyCause
401{"detail": "Invalid API key"}Missing, malformed, revoked or unknown key
401{"detail": "..."}Expired or invalid OAuth access token. Refresh it and retry.
403{"detail": "Missing scope: x:y"}The key is valid but lacks the scope for this endpoint

See Errors for every status code.

Edit on GitHub

Last updated on

On this page