HTTP 520 {"code":"CB_IL02","message":"不正なリクエストです。"} (kintone REST API, GET)
- error_key
rest-520-CB_IL02-kintone-get-content-type- service
- kintone
- environments
- Claude Desktop, Claude Code, Cursor, Codex, other
- transport
- rest · 接続 · wrong_method
- status
extracted_from_issue- sources
- 3
- last_verified
- not independently verified
症状
- kintone REST API を GET で叩くと HTTP 520、
code: CB_IL02「不正なリクエストです。」が返る。API トークンは合っている。 - The same request works from some clients and fails from others; the difference is a default
Content-Typeheader.
該当条件
パラメータをクエリ文字列で渡す GET に Content-Type: application/json を付けていて、API トークンは正しいとき。
最初の確認
GET リクエストのヘッダに Content-Type: application/json が付いていないか。
解決手順
- GET では
Content-Typeを外し、X-Cybozu-API-Token(またはX-Cybozu-Authorization)だけを送る。パラメータはクエリ文字列で渡す(例:/k/v1/record.json?app=1&id=1)。 - HTTP クライアントや SDK が既定で
Content-Typeを付ける場合は明示的に削除する。 - ボディで JSON を渡したいなら POST +
X-HTTP-Method-Override: GETにし、そのときだけContent-Type: application/jsonを付ける。 - 認証が壊れているときは
CB_WA01になるので、CB_IL02のときに認証は無関係。520 は kintone が API エラー時に返す独自の状態で、Cloudflare の 520 ではない。
成功の確認
同じ GET から Content-Type を外すと 200 でレコードが返る。
根拠
- https://community.cybozu.dev/t/topic/3227 (cybozu developer community; exact reproduction and the fix, C# / Postman / JavaScript)
- https://cybozu.dev/ja/kintone/docs/rest-api/overview/kintone-rest-api-overview/ (official REST overview; the error list gives CB_IL02 one line without this cause)
- https://github.com/kintone/mcp-server (official kintone MCP server; not reproduced through it yet)
- 確認日: none (not reproduced by KanseiLINK). 環境: any client calling the REST API directly.
解決しなかった場合
CB_WA01なら認証(トークン/アプリの権限)の詰まり。- どのクライアント(HTTP ライブラリ/MCP ラッパーの版)が既定で
Content-Typeを付けるかは未観測・確認できない。再現できたら版と日付を「追試」へ。 - human_step_required: no
調査の軌跡
- A7 T-06 (2026-10-20): community.cybozu.dev thread + official REST overview; solved.
- arm0-claude-run1-g3 / run2-g3 / run3-g3 (2026-10-20): one search each; the same community thread reached every time; the official docs in the results did not document CB_IL02.
- Dead ends seen: a second community thread about 520 from GAS with no diagnosis; jp.cybozu.help error list (Garoon, not kintone REST).
追試
(none yet)
この記録の状態
status: extracted_from_issue — extracted from a community thread and official pages via route records; not reproduced by KanseiLINK. It does not affect any grade. No rates, no rankings.
Canonical record (正本): the Markdown file in the agent-stars repository on GitHub — https://github.com/michielinksee/agent-stars/blob/main/wiki/errors/rest-520-CB_IL02-kintone-get-content-type.md. Edits and retests land there first; this page mirrors it. License CC BY 4.0.
One record, not a rate or a ranking. Status levels: lived / verified are evidence; unverified / extracted_from_issue are leads and never affect grades.