We offer two ways to pass your api key to the API. You can either pass it as a header or as a query parameter.
X-Api-Key Header
You can pass your api key as a header with the name X-Api-Key.
curl --location 'https://api.opticodds.com/api/v3/leagues?sport=basketball' \
--header 'X-Api-Key: <YOUR API KEY>'
Query Param
You can also pass your api key as a query parameter with the name key.
curl --location 'https://api.opticodds.com/api/v3/leagues?sport=basketball&key=<YOUR API KEY>'