Skip to content

Authentication

The X-API-Key header, and the one signed-in-session endpoint.

API key

Every operation except `/v1/account/keys` accepts this. There is no `?apiKey=` query fallback. Create one from Account after you sign in. Save the full value when it is created: only its prefix and final characters remain available afterward.

GET/v1/sports
curl --request GET \
  --url "https://oddslink.app/v1/sports" \
  --header "X-API-Key: ok_live_..." \
  --compressed
200 OKresponse.json
[
  {
    "key": "nfl",
    "group": "American Football",
    "title": "NFL",
    "description": "US Football",
    "active": true,
    "has_outrights": false
  },
  {
    "key": "nba",
    "group": "Basketball",
    "title": "NBA",
    "description": "US Basketball",
    "active": false,
    "has_outrights": false
  },
  {
    "key": "epl",
    "group": "Soccer",
    "title": "EPL",
    "description": "English Premier League",
    "active": true,
    "has_outrights": false
  },
  {
    "key": "tennis_atp_hangzhou",
    "group": "Tennis",
    "title": "ATP Hangzhou",
    "description": "Tennis",
    "active": true,
    "has_outrights": false
  }
]

Signed-in session

A signed-in website session's access token. Required by `/v1/account/keys`. An `X-API-Key` is refused there: only a signed-in customer creates or revokes keys. Use it only in the Account experience to create, list, or revoke API keys. The session-authenticated POST /v1/account/keys returns the new secret once; use the API key it returns in X-API-Key for odds requests.

Auth error codes

Every one of these is returned as a normal 401 with the standard error body.

CodeMessageAnchor
MISSING_KEYX-API-Key header is missing./docs/errors/#missing-key
INVALID_KEYAPI key is not valid./docs/errors/#invalid-key
MISSING_SESSIONSign in and try again./docs/errors/#missing-session
INVALID_SESSIONYour session has expired. Sign in again./docs/errors/#invalid-session