Authentication

Sarkoa uses session-based sign-in for the web app and API keys for programmatic access. The hosted MCP server also supports OAuth sign-in for configured compatible clients; use the authentication method offered by your connector.

Show diagramHide diagram

Rendering diagram…

flowchart TB
  User[User]
  Web[Web app session]
  Key[API key]
  Tools[CLI and QGIS]
  PubAPI[Public API]
  User --> Web
  User -->|Profile API and Integrations| Key
  Web --> Tools
  Key --> Tools
  Key -->|Bearer sk_...| PubAPI

Web sign-in

Sign in to the Sarkoa web app with your account. Sessions are used for browsing files, maps, billing, and creating API keys. Open the app from Sign in or Get started on sarkoa.com.

API keys

Create and revoke keys in the web app under Profile → API & Integrations. That page also links to CLI, MCP, QGIS, and Skills setup docs. Use the smallest scope your integration needs.

CLI, QGIS, and MCP

Keys used by the CLI, QGIS plugin, and hosted MCP. Pass the key as a Bearer token (CLI: SARKOA_API_TOKEN or sarkoa config set token; MCP: Authorization: Bearer … in the agent config).

To confirm a key works, call GET /api/me on the app host (for example https://app.sarkoa.com/api/me) with Authorization: Bearer <your_api_key>. A successful response includes your email, organization, scopes, and auth: "api_key". The same check is what sarkoa whoami uses.

Profile keys support these scopes. Select only the capabilities your integration needs:

Scope Purpose
read List, check status, download, and view files
write Upload, rename, and delete files; also grants map management for compatibility
maps:read Read maps
maps:write Create and edit maps; also permits publishing
maps:publish Publish maps and manage Explore listings, when available
maps:delete Delete maps

At least one scope is required. The broad read scope also permits reading maps; write permits reading, editing, publishing and deleting maps. maps:write includes publishing, but does not include deleting maps. Use the specific map scopes when an integration should manage maps without managing files. File reads still require read; write alone does not grant it.

Public API

The public API at api.sarkoa.com is available on Essential plan and above. Create Asset API keys under API Routes in the web app. Keys authenticate with Authorization: Bearer sk_.... Choose the read scopes the client needs, and add delegation only if required:

Scope Purpose
tiles:read Fetch raster and vector tiles
metadata:read Fetch asset metadata JSON
tokens:mint Mint and revoke delegated tokens through the app API; requires at least one read scope on the key

Below Essential, public API calls return 403 with code: plan_upgrade_required.

Asset API keys also accept ?api_key=sk_... as a query parameter, for clients that cannot set a header. Prefer the Bearer header: a key in a query string is recorded in server logs, proxy logs, and browser history, and is far easier to leak by accident.

The two key types are not interchangeable. A Profile key will not fetch tiles from api.sarkoa.com, and an Asset API key will not manage files. If a call fails with 401 on a key you know is valid, check you are using the right kind for that host: API reference has the split.

Organization ID for CLI and QGIS

Usually unnecessary: each Profile API key already targets one organization. CLI download-bulk additionally needs that organization ID, supplied through --org, stored org-id, or SARKOA_ORGANIZATION_ID, and a key with read scope. Details: CLI → Environment variables.

Security tips

  • Never commit API tokens to git or paste secrets into tickets or chat
  • Rotate keys if a machine or teammate loses access
  • Use a separate API key per organization