api
config_error
ai_generated
true
400 错误请求:需要 API 版本头部
400 Bad Request: API version header required
ID: api/rest-api-version-header-required
92%修复率
86%置信度
1证据数
2023-08-01首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| REST API v1.0 | active | — | — | — |
| Stripe API v2023-10 | active | — | — | — |
| GitHub API v3 | active | — | — | — |
根因分析
API 端点需要特定的版本头部(例如 Accept-Version 或 X-API-Version),但请求中未包含。
English
The API endpoint requires a specific version header (e.g., Accept-Version or X-API-Version) that was not included in the request.
官方文档
https://stripe.com/docs/api/versioning解决方案
-
Add the required version header to every request.
-
Use an API client configuration that automatically includes the version header.
无效尝试
常见但无效的做法:
-
80% 失败
The API specifically checks the header; query parameters are ignored for versioning.
-
90% 失败
Some APIs require explicit versioning; no default is assumed.
-
95% 失败
The version check is often middleware-level and applies to all methods.