SportXAPI authenticates API requests using an API key passed in the request headers.
Send your key in the X-API-Key HTTP header with each request:
Security Best Practices
Never commit your API key to client-side code, public GitHub repositories, or browser-accessible scripts.
- Keep Keys Server-Side: Make requests from backend servers, serverless functions, or reverse proxies.
- Environment Variables: Store keys in environment variables (e.g.
SPORTXAPI_KEY) rather than hardcoding.
- Key Rotation: If a key is accidentally exposed, immediately revoke it from the Dashboard and generate a replacement.