- 您请求的内容,经过
- 您有权访问的内容过滤
如何认证
可以将密钥作为X-API-Key 请求头传入,也可以作为 apiKey 查询参数传入。
所有端点都同时支持这两种方式,任选其一即可。
- 请求头(推荐)
- 查询参数
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
了解如何使用API密钥认证OddsPapi API请求,可通过 X-API-Key 请求头或 apiKey 查询参数传入。
X-API-Key 请求头传入,也可以作为 apiKey 查询参数传入。
所有端点都同时支持这两种方式,任选其一即可。
curl -H 'X-API-Key: YOUR_KEY' 'https://v5.oddspapi.io/zh/bookmakers'
curl 'https://v5.oddspapi.io/zh/bookmakers?apiKey=YOUR_KEY'
401 invalid_api_key 被拒绝——无论其中哪一个是有效的。
在两处发送同一个密钥则不会有问题。| 状态码 | code | 原因 |
|---|---|---|
401 | missing_api_key | 请求头和查询参数都未提供 |
401 | invalid_api_key | 密钥未知、已过期或已停用 |
403 | channel_not_allowed | 密钥有效,但无权访问该端点 |
{ "error": 401, "message": "missing apiKey", "code": "missing_api_key" }