Skip to main content

Authentication

API keys, OAuth for hosted MCP clients, operation scopes and how to create a key in your account.

Every data API call is authenticated and needs an API plan or the allowance included with Pro and higher website plans. There are two kinds of credential: API keys, for your own servers and scripts, and OAuth access tokens, for MCP clients that sign in on your behalf. Both go in the Authorization header as a bearer token.

Authorization: Bearer odk1_...

API keys

An API key starts with odk1_ followed by 43 characters. It belongs to one developer account, carries a fixed list of scopes and may have an expiry date. The key is stored only as a hash, so it is shown once, when you create or rotate it.

  • Keep keys on the server side: in environment variables or a secrets store. Keep them out of browser code, URLs, command arguments, logs and source control.
  • Rotating a key issues a new secret with the same name, scopes and expiry, and revokes the old one at once.
  • Revoking a key takes effect on the next request. A key can also be suspended while your plan does not allow it.
  • Only the owner of a developer account can see, create, rotate and revoke its keys. Each plan sets how many keys may be active at once (Pro and above: 2, Builder: 5, Business: 20, Scale: 50); creating one more is refused. Creating and rotating keys is also limited to 60 changes an hour.

Create a key in your account

  1. Sign in and open Developer account.
  2. If no developer account is listed, select Create developer account.
  3. Open the account and go to Keys.
  4. Enter a name. The scopes field starts with every operation as a comma-separated list; remove the ones the key does not need (for example, keep only catalog.search,datasets.list). If you want, add an expiry as a UTC date such as 2027-01-01T00:00:00Z.
  5. Create the key and copy the secret straight into your environment. It cannot be shown again.

The same page lists your keys with their prefix, scopes and state, and has the rotate and revoke actions. Usage and billing have their own pages. Keys work only while the account has an API plan or the allowance included with a website plan; without either, key creation and data requests are refused with plan_required. Members of other paid website plans can create up to 2 keys on their personal developer account for the Places connector at /mcp, but their data API requests are refused with plan_required.

Scopes

Each operation is its own scope, named after the operation. A key or token can call an operation only when it carries that scope and your role in the account allows it. Members with the viewer role can read but cannot create, request or cancel anything. A missing scope answers 403 insufficient_scope.

Operation scopes
Scope Operation Viewer role
catalog.search GET /api/v1/catalog Allowed
datasets.list GET /api/v1/datasets Allowed
datasets.get GET /api/v1/datasets/{datasetId} Allowed
indicators.list GET /api/v1/indicators Allowed
indicators.get GET /api/v1/indicators/{indicatorId} Allowed
entities.list GET /api/v1/entities Allowed
entities.get GET /api/v1/entities/{entityId} Allowed
entities.children GET /api/v1/entities/{entityId}/children Allowed
entities.geometry GET /api/v1/entities/{entityId}/geometry Allowed
series.list GET /api/v1/series Allowed
records.list GET /api/v1/records Allowed
releases.get GET /api/v1/releases/{releaseId} Allowed
changes.list GET /api/v1/changes Allowed
products.list GET /api/v1/products Allowed
products.get GET /api/v1/products/{productId} Allowed
sourceArtifacts.get GET /api/v1/source-artifacts/{artifactId} Allowed
sourceArtifacts.download GET /api/v1/source-artifacts/{artifactId}/download Allowed
jobs.get GET /api/v1/jobs/{jobId} Allowed
account.usage GET /api/v1/account/usage Allowed
point.lookup GET /api/v1/point Allowed
layers.list GET /api/v1/layers Allowed
layers.download GET /api/v1/layers/{layerId}/download Allowed
layers.features GET /api/v1/layers/{layerId}/features Allowed

OAuth for MCP clients

The hosted data MCP server at /mcp/data accepts OAuth 2 access tokens from the Oyster List authorization server at https://oysterlist.com/oauth. Clients discover it from the protected-resource metadata:

GET https://oysterlist.com/.well-known/oauth-protected-resource/mcp
GET https://oysterlist.com/.well-known/oauth-authorization-server/oauth
  • Authorization code flow with PKCE is required. Public clients use token_endpoint_auth_method: none.
  • A client identifies itself with an HTTPS client metadata document or with a registered client ID.
  • Every token request names its resource: https://oysterlist.com/mcp (which covers /mcp/data) or https://oysterlist.com/api/v1. A token works only for the resource it was issued for, so an MCP token is not a REST credential.
  • You approve the client and its scopes on an Oyster List consent page. The granted scopes are limited to those your account role allows.
  • Access tokens are opaque and expire after 300 seconds. Revoked grants stop working on the next request.
  • A request without valid credentials gets 401 with a WWW-Authenticate header that points to the metadata URL above.

The /mcp/data endpoint also accepts an odk1_ API key directly. The consumer connector at /mcp (Oyster Places) is a separate, smaller set of place tools.