GoatCounter · Authentication Profile

Goatcounter Authentication

Authentication

GoatCounter authenticates the JSON API with a per-site API key. The primary documented scheme is an HTTP bearer token in the Authorization header; HTTP Basic is also accepted with an empty username and the API key as the password, which the docs describe as mostly useful for testing from a browser. Note that the provider-published OpenAPI 2.0 document declares only basicAuth under securityDefinitions, so the bearer scheme — the one the docs lead with — is documented in prose but absent from the machine-readable contract. Both are recorded here.

GoatCounter secures its APIs with http across 2 declared security schemes, as derived from its OpenAPI definitions.

AnalyticsPage ViewsPrivacyStatisticsWeb AnalyticsOpen-SourceSelf-HostedEventData ExportDeveloper Tools
Methods: http Schemes: 2 OAuth flows: API key in: header

Security Schemes

bearerAuth http
scheme: bearer · in: header (Authorization)
basicAuth http
scheme: basic · in: header (Authorization)

Source

Authentication Profile

Raw ↑
generated: '2026-08-13'
method: searched
source: openapi/_original/goatcounter-api-swagger20.json
docs: https://www.goatcounter.com/help/api
description: >-
  GoatCounter authenticates the JSON API with a per-site API key. The primary documented scheme
  is an HTTP bearer token in the Authorization header; HTTP Basic is also accepted with an empty
  username and the API key as the password, which the docs describe as mostly useful for testing
  from a browser. Note that the provider-published OpenAPI 2.0 document declares only basicAuth
  under securityDefinitions, so the bearer scheme — the one the docs lead with — is documented in
  prose but absent from the machine-readable contract. Both are recorded here.
summary:
  types:
    - http
  http_schemes:
    - bearer
    - basic
  api_key_in: [header]
  oauth2_flows: []
  oauth2: false
  openid_connect: false
  mutual_tls: false
schemes:
  - name: bearerAuth
    type: http
    scheme: bearer
    in: header
    parameter: Authorization
    format: 'Authorization: Bearer <token>'
    documented: true
    in_spec: false
    sources:
      - https://www.goatcounter.com/help/api
      - openapi/goatcounter-users-api-openapi.yml
    note: >-
      The documented primary scheme. Present in the API Evangelist refined OpenAPI files but not
      in the provider's own api.json, whose securityDefinitions contains basicAuth only.
  - name: basicAuth
    type: http
    scheme: basic
    in: header
    parameter: Authorization
    documented: true
    in_spec: true
    username: '(leave empty)'
    password: 'the API key'
    sources:
      - openapi/_original/goatcounter-api-swagger20.json
      - https://www.goatcounter.com/help/api
    evidence:
      probed: '2026-08-13'
      url: https://stats.arp242.net/api/v0/me
      response_header: 'www-authenticate: Basic realm=GoatCounter'
credential:
  kind: api-key
  name: API key / API token
  issuance: >-
    Created by the account holder in the GoatCounter dashboard under [Username in top menu] -> API.
  scope: per-site
  rotation: self-serve (create and delete keys in the dashboard)
  oauth: false
  note: >-
    There is no OAuth or OIDC surface, so there is no scopes/ artifact for this provider. Keys carry
    a permissions set instead — see permissions below.
permissions:
  model: per-key permission flags
  discoverable_at: GET /api/v0/me
  schema: goatcounter.APIToken (fields name, permissions, sites)
  source: openapi/_original/goatcounter-api-swagger20.json
  note: >-
    The published OpenAPI types the APIToken object with a permissions field, and the docs state that
    a key without the needed permission gets 403 Forbidden, but the individual permission names are
    not enumerated in the public documentation or in the spec. Not guessed here.
failure_modes:
  - status: 401
    condition: API key missing or incorrect
    source: https://www.goatcounter.com/help/api
  - status: 403
    condition: API key valid but lacks the needed permissions
    source: https://www.goatcounter.com/help/api
transport:
  https_required: true
  content_type: application/json
  note: All requests must set Content-Type application/json; all responses are JSON unless noted otherwise.
maintainers:
  - FN: Kin Lane
    email: kin@apievangelist.com

Work with this as data

Every security artifact here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for security posture

4 MCP tools reach this
  • find_securityBrowse and filter every security artifact in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This security artifact
curl "https://apis.io/api/v1/security/goatcounter-authentication"
All security posture
curl "https://apis.io/api/v1/security?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.