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
- 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.
- Baller reviews the app and sends a
client_idand, for server apps, aclient_secret. Mobile and single-page apps get a public client (PKCE, no secret). - Point your OIDC library at the discovery document. Redirect URIs must be
https(orhttp://localhostwhile you build).
| Discovery | https://api.ballerfootballer.com/.well-known/openid-configuration |
|---|---|
| Authorize | https://ballerfootballer.com/oauth/authorize |
| Token | https://api.ballerfootballer.com/oauth/token |
| UserInfo | https://api.ballerfootballer.com/oauth/userinfo |
| Revoke | https://api.ballerfootballer.com/oauth/revoke |
| JWKS | https://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=S256The 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.
| Scope | What you get | Under 18 |
|---|---|---|
| openid | Required. A pairwise sub (different for each app) and the player's baller_id. | Yes |
| profile | Name, 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 |
| Email address. | Never | |
| career.read | Career history: clubs, seasons, appearances, goals, verified flags. | Yes |
| media.read | Clips the player added. | Yes |
| verification.read | Verification status and how it was verified. | Yes |
| stats.read | Baller rating, pillars and metrics, with each metric's source. | Yes |
| activity.read | Sessions from sources that allow sharing: file uploads, partner feeds and apps. Never heart rate. | Yes |
| activity.write | Add sessions to the player's ballerID (for trackers, clubs, tournaments). | Yes |
| offline_access | A refresh token (90 days, rotates on every use). | Yes |
Players under 18
- Your app is only offered to under-18s if Baller has cleared it for minors. Otherwise they get
error=access_denied&error_description=not_available_for_minors. - The first time an under-18 signs in, a parent or guardian has to approve your app. Until then you get
error=access_denied&error_description=guardian_approval_pending. Tell the player their parent has been asked, and let them try again later. - A parent who runs a child's ballerID (children with no phone) signs in for them and picks the child.
- No email, no date of birth, no city for minors. You get the age band only.
- Guardians can remove your access at any time; tokens stop working at once.
Data API
All with Authorization: Bearer <access_token>. Missing scope: 403 insufficient_scope.
| GET /v1/me | openid | Same claims as userinfo. |
| GET /v1/me/career | career.read | Career entries, newest first. |
| GET /v1/me/media | media.read | Clips. |
| GET /v1/me/verification | verification.read | { status, source } |
| GET /v1/me/stats | stats.read | Rating, pillars and metrics. |
| GET /v1/me/sessions?since=&limit= | activity.read | Shareable sessions, newest first (max 200). |
| POST /v1/me/sessions | activity.write | Up 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
- Health data (heart rate, sleep, recovery, HRV) never leaves Baller.
- Data from Strava, Garmin, WHOOP, Polar and Fitbit stays on the player's own dashboard: their terms don't allow passing it on.
subis pairwise: the same player has a differentsubin each app. Useballer_idonly to show or link the profile.- Once you receive data you are its controller under GDPR: you need your own privacy policy and lawful basis, and must delete data when the player removes your access, unless the law says otherwise.
- No selling player data, no ads targeted at under-18s.
Errors
Standard OAuth error bodies: { "error": "invalid_grant", "error_description": "…" }.
| invalid_client (401) | Wrong client id or secret, or the app is suspended. |
| invalid_grant | Code expired, used twice, wrong verifier or redirect URI; refresh token reused, expired or access withdrawn. |
| invalid_scope | A scope your app is not allowed, or openid missing. |
| access_denied | The 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