From 884bca52257b263eb481fec33a4c2b05e6b61114 Mon Sep 17 00:00:00 2001 From: berkay-digital <46861579+berkay-digital@users.noreply.github.com> Date: Wed, 25 Nov 2026 05:58:29 +0100 Subject: [PATCH] docs: note Kick's 400 for unmoderatable users and offline custom tags --- AGENTS.md | 1 + docs/api.md | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index c62dcb9..0ddb157 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -23,6 +23,7 @@ KICK_CLIENT_ID=... KICK_CLIENT_SECRET=... uv run pytest -m live - Kick's spec lives at https://api.kick.com/swagger/doc.yaml, the docs at https://github.com/KickEngineering/KickDevDocs. Check both before adding or changing an endpoint, and test the change live. The spec has been wrong before: it says `/public/v2/categories` takes comma-separated lists, but the API only accepts repeated keys. - Kick returns 401, not 403, for a valid token that lacks a scope. +- `POST /moderation/bans` returns a bare 400 for the broadcaster, the app's own bot, or an unknown user. Live-test moderation on a public bot account (for example BotRix) with a 1 minute timeout, then unban. - Never log or `repr()` tokens or client secrets. - Models subclass `KickModel` (extra fields allowed). Convert Kick's `""` and `0001-01-01T00:00:00Z` to `None` with `OptionalStr` / `OptionalDatetime`. - Don't wrap endpoints Kick marks deprecated. diff --git a/docs/api.md b/docs/api.md index 5746bfa..7771066 100644 --- a/docs/api.md +++ b/docs/api.md @@ -20,7 +20,7 @@ Methods that take a list of IDs or slugs split it into several requests when it | `channels.me()` returns `Channel` | same | User | | `channels.update(stream_title=, category_id=, custom_tags=)` | `PATCH /public/v1/channels` | User, `channel:write` | -`Channel.category` is `None` when no category is set. `Channel.stream.key` and `.url` are only filled with `streamkey:read`. +`Channel.category` is `None` when no category is set. `Channel.stream.key` and `.url` are only filled with `streamkey:read`. Kick accepts `custom_tags` on an offline channel, but `Channel.stream.custom_tags` stays empty until the channel goes live. ## Chat @@ -42,6 +42,8 @@ All need a user token with `moderation:ban`. `broadcaster_user_id` defaults to t | `moderation.timeout(user_id, minutes, broadcaster_user_id=None, reason=None)` | same, with `duration` (1 to 10080 minutes) | | `moderation.unban(user_id, broadcaster_user_id=None)` | `DELETE /public/v1/moderation/bans` | +Kick answers a bare `400 Invalid request` (raised as `BadRequestError`) when the target can't be moderated: the broadcaster themselves, your app's own bot account, or a user ID that doesn't exist. + ## Channel rewards User token. Reading needs `channel:rewards:read`, everything else `channel:rewards:write`. Only the app that created a reward can change, delete or resolve it.