api config_error ai_generated true

400 错误请求:需要 API 版本头部

400 Bad Request: API version header required

ID: api/rest-api-version-header-required

其他格式: JSON · Markdown 中文 · English
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.

generic

官方文档

https://stripe.com/docs/api/versioning

解决方案

  1. Add the required version header to every request.
  2. Use an API client configuration that automatically includes the version header.

无效尝试

常见但无效的做法:

  1. 80% 失败

    The API specifically checks the header; query parameters are ignored for versioning.

  2. 90% 失败

    Some APIs require explicit versioning; no default is assumed.

  3. 95% 失败

    The version check is often middleware-level and applies to all methods.