Aden

Authentication

Bearer tokens: team API keys from your server, Supabase sessions for apps people sign in to.

Every authenticated request carries a bearer token in the Authorization header:

GET /api/v1/tracks?teamId=216 HTTP/1.1
Host: aden.space
Authorization: Bearer <token>

A token that starts with aden_ is a team API key. Anything else is read as a Supabase session token.

Public data needs no token at all: see Anonymous access.

Team API keys

  • Created on Team → API → New key in Aden, by a team admin, on the Lite plan or higher.
  • Format: aden_ followed by 64 hex characters. Shown once; Aden stores only its hash.
  • Bound to the team it was made in. Pass that team as teamId on list endpoints; any other team is refused.
  • Server only. A request with an Origin header (every browser sends one) is refused with 403 server_only: a key in a web page is readable by every visitor. For a public website, use the site feed.
curl "https://aden.space/api/v1/tracks?teamId=216&limit=5" \
  -H "Authorization: Bearer $ADEN_API_KEY"

Your team id is the number in the API page's address (aden.space/app/teams/216/api).

Access

KeyCan do
Read onlyGET on every endpoint below. Anything else is 403 insufficient_scope, even if the key leaks.
Read & writeThe same reads, plus creating and changing milestones, tasks, contacts, webhooks and app data.

Endpoints

Keys reach these resources and every route under them:

/tracks (with versions and stems), /albums, /playlists, /events, /tours, /posts, /milestones, /todos, /contacts, /webhooks, /app-data.

Everything else answers a key with 403 endpoint_not_allowed before the key is even checked. Uploading audio, creating tracks, adding collaborators, chat and team management need a signed-in member.

Revoking

Team → API → Revoke turns a key off within a minute. Found someone else's Aden key in public (a repository, a chat)? Report it and its team is told.

Supabase session tokens

Apps that people sign in to send that person's Supabase access token, the same one the Aden web app uses. Requests run as that person and reach the teams they belong to.

const {
    data: { session },
} = await supabase.auth.getSession()

const res = await fetch('https://aden.space/api/v1/auth/me', {
    headers: { Authorization: `Bearer ${session?.access_token}` },
})
  • The token expires and refreshes on Supabase's schedule.
  • auth.me, user.* and team management take a session token, never a key.
  • One app may send 300 requests a minute and 9,000 an hour per person.

Choosing a mode

You're buildingUse
A public website showing releases and showsSite feed, no key
A website showing private dataAPI key, from your server
A cron job, CI step, CLI tool or sync scriptAPI key
An app people sign in toSupabase session

Anonymous access

These need no token:

  • GET /api/v1/public/sites/:handle: an artist's site feed.
  • GET /api/v1/health
  • GET /api/v1/testimonials

Everything else returns 401 { "error": "Unauthorized" } without a valid token.

Was this helpful?

On this page