Developers

Sign in with ballerID

Let football players sign in to your app with their ballerID, and read their career, stats and sessions, only with their consent. Standard OpenID Connect, so any OIDC library works.

Get started

  1. Email hello@ballerfootballer.com with your app's name, website, privacy policy, redirect URIs, the scopes you need, and whether players under 18 will use it.
  2. Baller reviews the app and sends a client_id and, for server apps, a client_secret. Mobile and single-page apps get a public client (PKCE, no secret).
  3. Point your OIDC library at the discovery document. Redirect URIs must be https (or http://localhost while you build).
Discoveryhttps://api.ballerfootballer.com/.well-known/openid-configuration
Authorizehttps://ballerfootballer.com/oauth/authorize
Tokenhttps://api.ballerfootballer.com/oauth/token
UserInfohttps://api.ballerfootballer.com/oauth/userinfo
Revokehttps://api.ballerfootballer.com/oauth/revoke
JWKShttps://api.ballerfootballer.com/.well-known/jwks.json

The flow

Authorization code with PKCE (S256), always, for every client. ID tokens are RS256, keys at the JWKS URL.

1. Send the player to Baller

https://ballerfootballer.com/oauth/authorize
  ?client_id=blr_app_…
  &redirect_uri=https://yourapp.com/callback
  &response_type=code
  &scope=openid profile career.read offline_access
  &state=<random>
  &nonce=<random>
  &code_challenge=<BASE64URL(SHA256(verifier))>
  &code_challenge_method=S256

The player signs in, picks which ballerID (a parent can pick a child they run), sees exactly what you asked for, and allows or cancels.

2. Exchange the code

You get ?code=…&state=…&iss=… back. Check state and iss, then within 60 seconds:

curl -X POST https://api.ballerfootballer.com/oauth/token \
  -u "$CLIENT_ID:$CLIENT_SECRET" \
  -d grant_type=authorization_code \
  -d code=$CODE \
  -d redirect_uri=https://yourapp.com/callback \
  -d code_verifier=$VERIFIER

{
  "access_token": "…",          // 1 hour
  "refresh_token": "…",         // with offline_access: 90 days, rotates
  "id_token": "eyJhbGciOiJSUzI1NiIs…",
  "token_type": "Bearer",
  "expires_in": 3600,
  "scope": "openid profile career.read offline_access"
}

3. Read the player

curl https://api.ballerfootballer.com/oauth/userinfo -H "Authorization: Bearer $ACCESS_TOKEN"

{
  "sub": "q3V9…",              // stable for your app only
  "baller_id": "BLR-7K3Q9X",
  "name": "Nikola Petrović",
  "position": "CB",
  "club": "FK Vojvodina",
  "age_band": "adult",
  "is_minor": false,
  "verified": true,
  "profile": "https://ballerfootballer.com/players/BLR-7K3Q9X"
}

4. Refresh and revoke

Refresh with grant_type=refresh_token. Each refresh token works once; using an old one again revokes the whole chain, so store the new one every time. When the player disconnects inside your app, call /oauth/revoke with the refresh token.

Scopes

Ask only for what you use. The player sees each one in plain words.

ScopeWhat you getUnder 18
openidRequired. A pairwise sub (different for each app) and the player's baller_id.Yes
profileName, photo, position, foot, height, club, level, nationalities, country, age band (under_13, 13_15, 16_17, adult), verified flag. Never the date of birth.Yes
emailEmail address.Never
career.readCareer history: clubs, seasons, appearances, goals, verified flags.Yes
media.readClips the player added.Yes
verification.readVerification status and how it was verified.Yes
stats.readBaller rating, pillars and metrics, with each metric's source.Yes
activity.readSessions from sources that allow sharing: file uploads, partner feeds and apps. Never heart rate.Yes
activity.writeAdd sessions to the player's ballerID (for trackers, clubs, tournaments).Yes
offline_accessA refresh token (90 days, rotates on every use).Yes

Players under 18

Data API

All with Authorization: Bearer <access_token>. Missing scope: 403 insufficient_scope.

GET /v1/meopenidSame claims as userinfo.
GET /v1/me/careercareer.readCareer entries, newest first.
GET /v1/me/mediamedia.readClips.
GET /v1/me/verificationverification.read{ status, source }
GET /v1/me/statsstats.readRating, pillars and metrics.
GET /v1/me/sessions?since=&limit=activity.readShareable sessions, newest first (max 200).
POST /v1/me/sessionsactivity.writeUp to 100 sessions; upserts by your external_id.

Writing sessions

Metres, seconds, metres per second. Send the same external_id again to update. Heart rate is kept only if the player allowed health data, and is never given to other apps.

curl -X POST https://api.ballerfootballer.com/v1/me/sessions \
  -H "Authorization: Bearer $ACCESS_TOKEN" -H "Content-Type: application/json" \
  -d '{ "sessions": [{
        "external_id": "match-2026-12-01",
        "kind": "MATCH",                 // MATCH TRAINING RUN CYCLE GYM OTHER
        "start_at": "2026-12-01T18:00:00Z",
        "duration_s": 5400,
        "distance_m": 10400,
        "top_speed_ms": 9.1,
        "sprints": 21,                   // efforts above 7 m/s for 1 s or more
        "high_speed_distance_m": 820,    // above 5.5 m/s
        "device": "Your tracker"
      }] }'

{ "stored": 1, "heart_rate_kept": false }

Data rules

Errors

Standard OAuth error bodies: { "error": "invalid_grant", "error_description": "…" }.

invalid_client (401)Wrong client id or secret, or the app is suspended.
invalid_grantCode expired, used twice, wrong verifier or redirect URI; refresh token reused, expired or access withdrawn.
invalid_scopeA scope your app is not allowed, or openid missing.
access_deniedThe player cancelled; or guardian_approval_pending; or not_available_for_minors.
invalid_token (401)Access token expired or revoked: refresh or sign in again.
insufficient_scope (403)The token lacks the scope this endpoint needs.

Full endpoint reference: https://api.ballerfootballer.com/docs