API & integrations

API authentication

The REST API (Scale plan) authenticates with bearer tokens you create per use-case, scoped, revocable, and never able to read account or billing data.

5 min read Updated June 2026 API & integrations
$ curl api.bobray.com/v1 -H "Authorization: Bearer" {"visitors": 48210,"pageviews": 112094}

Creating a token

  1. Go to Settings → API and click New token.
  2. Name it after its consumer, “Looker import”, “Internal wiki widget”.
  3. Choose scope: read-only stats (default) or stats + goal management.
  4. Copy it once, tokens are shown a single time and stored hashed.

Using it

curl https://api.bobray.com/v1/stats?site=br_7fk2mq&period=30d \
  -H "Authorization: Bearer YOUR_TOKEN"

Limits and hygiene

Common pitfalls

The mistakes we see most often on this topic, so you can skip them entirely.

Quick reference

HeaderAuthorization: Bearer
Rate limit600/min/token
Scopesread · read+goals
RotationRevoke + reissue, instant
Did this solve it? If not, write to support with your site ID, a real person replies within one business day.