/authentication

Authentication

Bearer tokens for /v1/ask, /v1/fetch, and the hosted MCP endpoint.

HTTP
Authorization: Bearer <token>

​ Public vs. protected endpoints

  • GET /healthz, GET /readyz — health probes.
  • GET /v1/meta/fields — the field catalog.
  • GET /v1/docs, GET /v1/openapi.json — Swagger UI and OpenAPI spec.
  • POST /v1/ask, POST /v1/fetch — all data requests.
  • /mcp — the hosted MCP endpoint (OAuth 2.1 bearer).
  • Account and token-management routes under /v1/users/me/*.

​ Getting a token

​ 1. API token from the dashboard (services, scripts, CI)

Shell
export MIREYE_API_TOKEN="<paste from dashboard>"

curl -s https://api.mireye.com/v1/fetch \
  -H "Authorization: Bearer $MIREYE_API_TOKEN" \
  -H 'content-type: application/json' \
  -d '{"lat": 40.7128, "lng": -74.0060, "fields": ["elevation"]}'

​ 2. Device-flow login (local MCP stdio adapter)

Shell
mireye-mcp login

​ 3. OAuth 2.1 + PKCE (hosted MCP endpoint)

​ Auth error codes

​ Rate limits and quotas