Skip to navigation

Authentication

Accounts, API keys, and sign-in

View as Markdown

The API, CLI, and MCP server all require an aVenture account; free and paid plans both work. How you sign in depends on where you work:

Where you workHow you sign in
MCP client (Claude, ChatGPT, and other AI apps)Sign in through the browser when your client connects; use OAuth discovery and automatic client registration. See the MCP quickstart for the fallback client ID when needed
CLIRun aventure auth login, or set AUTH_TOKEN to an API key
ResearchlyChoose Connect aVenture under Profile, then MCP servers
APISend an API key as a bearer token

Create an API Key

  1. Sign in to aVenture.
  2. Open API Keys settings.
  3. Choose Add new key.

Store the key in your secret manager and load it into the AUTH_TOKEN environment variable at runtime. The same page lists and revokes your keys. Send it on every request:

curl -H "Authorization: Bearer $AUTH_TOKEN" \
"https://api.aventure.vc/v1/auth/me/permissions"

A 200 confirms the key works and lists what it can reach.

Sign In From the CLI

aventure auth login

The command opens your browser for OAuth sign-in. For SSH, containers, or another device, use:

aventure auth login --no-browser

When the issuer advertises OAuth device authorization, --no-browser uses that flow: open the returned URL on your device, approve the displayed code, and let the CLI finish verifying and storing its OAuth access. If device authorization is unavailable, follow the reported error rather than assuming a loopback callback will complete in a headless session.

aventure auth login --key --no-browser is a separate API-key approval fallback. It is not required for OAuth device approval. Developer Access settings lists past CLI sign-ins and revokes them. In CI, set AUTH_TOKEN to an API key instead.

Connect an MCP Client

The MCP quickstart has setup instructions and prompts for your AI app, plus the server URL and automatic OAuth registration settings. Your client signs you in through the browser when it connects.

Keep Credentials Safe

Anyone holding an API key or token has the access it grants, and their calls use your allowances. Keep credentials server-side, load them from a secret manager, and never ship one in browser code or commit one to a repository.

When Authentication Fails

A missing, expired, or unrecognized credential returns 401, and its detail says how to sign in:

Where you workFix a 401
MCP clientReconnect the server so your client signs you in again; in Claude Code, run /mcp and select aventure
CLIRun aventure auth login; aventure auth doctor names any other failed setup check
APISend a current API key from API Keys settings

A valid credential that lacks permission for an operation returns 403; signing in again does not change it. Both use the standard error body.