Projekt Developers
PAT · OAuth 2.1 · Session

Authentication.

Projekt accepts three credential types on the same API surface. Which one you want depends on whether a human is in the loop, whether a third-party agent needs scoped access, and how long you need the credential to live.

Pick one#

ModeBest forLifetimeIdentitySetup
Personal Access Token
pjk_live_…
Claude, Codex, CI scripts, cron jobs, your own backend talking to Projekt. Until revoked (optional expiry). Acts as the human who minted it. Bound to ONE org. Click "Create API key" in Integraciones.
OAuth 2.1 + DCR Third-party SaaS that lets the user sign in with Projekt and pick which org/scopes to grant. Used by claude.ai's MCP connector. Access tokens 1h, refresh tokens long-lived. Acts as the user. Bound to one org via RFC 8707 resource binding. POST /oauth/register (RFC 7591) then standard authorization-code + PKCE.
Browser session The Projekt web app itself. Not something you build against. 30 days, refresh-on-use. The signed-in user. Sign in.
i
If in doubt, use a PAT

Personal Access Tokens are the right answer for almost every server-to-server integration. Reach for OAuth only if you are building a multi-tenant app and the user needs to grant your tool access without sharing a long-lived secret.

Personal Access Tokens#

Minting a key#

  1. Sign in to Projekt.
  2. Open Organization → Settings → General → Integraciones.
  3. Click Create API key, give it a descriptive name (e.g. Claude desktop, CI deploy, nightly-backup), optionally set an expiry, and confirm.
  4. Copy the plaintext token. It is shown exactly once.

The token is hashed (SHA-256) before being stored, the same pattern Projekt uses for browser sessions and OAuth access tokens. There is no "recover key" flow: lose it, revoke it, mint a new one.

You can have up to 20 active keys per user per org. Revoke unused ones.

Using the key#

curl https://projekt.3xa.es/api/projects \
  -H "Authorization: Bearer pjk_live_..." \
  -H "X-Org-Id: <ORG_ID>"

Two headers carry everything Projekt needs:

Scope and permissions#

Revoking a key#

Same screen: Organization → Settings → General → Integraciones, click Revoke next to the key. Revocation is instant — the next request returns 401.

OAuth 2.1#

Projekt is a full OAuth 2.1 Authorization Server with Dynamic Client Registration (RFC 7591), PKCE, and RFC 8707 resource binding. This is what claude.ai uses to connect to your Projekt org as an MCP server.

Discovery#

curl https://projekt.3xa.es/.well-known/oauth-authorization-server

That metadata endpoint advertises the authorization_endpoint, token_endpoint, registration_endpoint, and supported scopes_supported, code_challenge_methods_supported, etc.

Register a client#

curl -X POST https://projekt.3xa.es/oauth/register \
  -H "Content-Type: application/json" \
  -d '{
    "client_name":   "My integration",
    "redirect_uris": ["https://example.com/cb"],
    "grant_types":   ["authorization_code", "refresh_token"],
    "token_endpoint_auth_method": "none"
  }'

Authorization code + PKCE#

Standard flow — see the Authorization Server metadata for the exact endpoints. The resource parameter (resource=https://projekt.3xa.es/api) is required and the org is selected on the consent screen, then baked into the token.

i
Heads-up

OAuth is intended for third-party SaaS integrations where a Projekt user wants to delegate access. If you are writing a script you control, a PAT is much simpler.

Security tips#