{
  "id": "api/oauth2-unauthorized-client",
  "signature": "OAuth2 error: unauthorized_client",
  "signature_zh": "OAuth2 错误：未授权的客户端",
  "regex": "OAuth2 error: unauthorized_client",
  "domain": "api",
  "category": "auth_error",
  "subcategory": null,
  "root_cause": "The client_id or client_secret provided in the OAuth2 token request is not registered or is disabled for the requested grant type.",
  "root_cause_type": "generic",
  "root_cause_zh": "OAuth2 令牌请求中提供的 client_id 或 client_secret 未注册，或该客户端被禁止使用请求的授权类型。",
  "versions": [
    {
      "version": "OAuth2 RFC 6749",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "OAuth2 RFC 6750",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Regenerating the client_secret without updating the application configuration will not resolve the issue if the client_id is incorrect or the grant type is not allowed.",
      "fail_rate": 0.4,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Whitelisting the IP address of the client server does not address the root cause of an invalid client registration.",
      "fail_rate": 0.3,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Verify the client_id and client_secret in the OAuth2 provider's dashboard. Ensure the client is enabled and the correct grant type (e.g., authorization_code, client_credentials) is allowed. Example: curl -X POST https://auth.example.com/token -d 'grant_type=client_credentials&client_id=valid_client&client_secret=valid_secret'",
      "success_rate": 0.9,
      "how": "Verify the client_id and client_secret in the OAuth2 provider's dashboard. Ensure the client is enabled and the correct grant type (e.g., authorization_code, client_credentials) is allowed. Example: curl -X POST https://auth.example.com/token -d 'grant_type=client_credentials&client_id=valid_client&client_secret=valid_secret'",
      "condition": "",
      "sources": []
    },
    {
      "action": "Check the provider's documentation for required scopes or additional parameters. Add missing scopes: POST /token with scope=openid profile",
      "success_rate": 0.5,
      "how": "Check the provider's documentation for required scopes or additional parameters. Add missing scopes: POST /token with scope=openid profile",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "在 OAuth2 提供方的管理面板中验证 client_id 和 client_secret。确保客户端已启用且允许正确的授权类型（例如 authorization_code、client_credentials）。示例：curl -X POST https://auth.example.com/token -d 'grant_type=client_credentials&client_id=valid_client&client_secret=valid_secret'",
    "查阅提供方的文档，确认是否需要指定的作用域或其他参数。添加缺失的作用域：POST /token 带上 scope=openid profile"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://datatracker.ietf.org/doc/html/rfc6749#section-5.2",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.9,
  "resolvable": "true",
  "first_seen": "2024-03-15",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}