VideosResource.create and TasksResource.create build json_body from the full params dict, then separately use params.get("idempotency_key") to set the Idempotency-Key header. Passing idempotency_key therefore sends it both as a header and as a JSON field, for example client.videos.create(..., idempotency_key="idem_1") serializes an idempotency_key property in the body. APIs that validate payload schemas can reject otherwise valid idempotent create requests; remove header-only params before building the sync and async create payloads.
File: src/globalrouter/_resources.py
Line: 335
Severity: medium
Summary: idempotency_key leaks into create request bodies
VideosResource.create and TasksResource.create build json_body from the full params dict, then separately use params.get("idempotency_key") to set the Idempotency-Key header. Passing idempotency_key therefore sends it both as a header and as a JSON field, for example client.videos.create(..., idempotency_key="idem_1") serializes an idempotency_key property in the body. APIs that validate payload schemas can reject otherwise valid idempotent create requests; remove header-only params before building the sync and async create payloads.
File:
src/globalrouter/_resources.pyLine: 335
Severity: medium
Summary: idempotency_key leaks into create request bodies