Authentication Methods
Query Parameter
The simplest approach is to pass your API key as a query parameter. Appendkey to any request URL.
Request Header
Pass your API key in theX-TheRundown-Key request header. This is the recommended method for server-side applications.
Bearer Token (OAuth2)
For applications using OAuth2 flows, pass a bearer token in theAuthorization header.
Code Examples
Public Endpoints
The following endpoints do not require authentication and can be called without an API key:| Endpoint | Description |
|---|---|
GET /api/v2/sports | Returns the list of available sports and their IDs. |
GET /api/v2/affiliates | Returns the list of available sportsbook affiliates. |
Security Best Practices
Never expose keys in client-side code
Never expose keys in client-side code
API keys embedded in frontend JavaScript, mobile app bundles, or public repositories can be extracted by anyone. Always route API calls through your own backend server.
Use environment variables
Use environment variables
Store your API key in an environment variable rather than hardcoding it in source files. This prevents accidental commits to version control and makes key rotation straightforward.
Python
Node.js
Rotate keys if compromised
Rotate keys if compromised
If you suspect your API key has been exposed, contact TheRundown support immediately to rotate your key. Update all services that reference the old key as part of the rotation.
Use separate keys per environment
Use separate keys per environment
Maintain distinct API keys for development, staging, and production. This limits the blast radius if a non-production key is leaked and makes it easier to track usage per environment.