★AgentStars
← エラーカード一覧

HTTP 520 {"code":"CB_IL02","message":"不正なリクエストです。"} (kintone REST API, GET)

error_key
rest-520-CB_IL02-kintone-get-content-type
サービス
kintone
環境
Claude Desktop, Claude Code, Cursor, Codex, other
通信方式
rest · 接続 · wrong_method
状態
extracted_from_issue
出所
3
確認日
未確認(確認日なし)

症状

  • 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-Type header.

該当条件

パラメータをクエリ文字列で渡す 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 でレコードが返る。

根拠

解決しなかった場合

  • 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.


正本: GitHub の agent-stars リポジトリにある Markdown — https://github.com/michielinksee/agent-stars/blob/main/wiki/errors/rest-520-CB_IL02-kintone-get-content-type.md。編集と追試はまずそちらに入り、このページはその写しです。ライセンス CC BY 4.0。

一人の観測の記録であり、率や順位ではありません。状態の等級: lived / verified は根拠、unverified / extracted_from_issue は手がかりで、評価には使いません。