From d96ef94406e72a9cc8d1dcfffaa51c228bdc60a5 Mon Sep 17 00:00:00 2001 From: Jelmer de Wit <1598297+jdwit@users.noreply.github.com> Date: Thu, 18 Jun 2026 10:35:43 +0200 Subject: [PATCH 1/2] docs: skill month/week date alignment and OAuth access_denied notes --- skills/ytstudio/SKILL.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/skills/ytstudio/SKILL.md b/skills/ytstudio/SKILL.md index 5b09199..b83409a 100644 --- a/skills/ytstudio/SKILL.md +++ b/skills/ytstudio/SKILL.md @@ -75,6 +75,16 @@ ytstudio status # confirms the authenticated channel On a headless box, use `ytstudio login --headless`: it prints a URL to open in any browser, then you paste the failed `127.0.0.1` redirect URL back in. +If `ytstudio login` fails with `access_denied`: + +- Sign in with the Google account that owns the channel. +- If the OAuth app is still in "Testing", add that account under Google Cloud + Console -> APIs & Services -> OAuth consent screen -> Test users. +- Click through the "Google hasn't verified this app" warning via Advanced -> + Continue. +- Approve all requested (read-only) scopes; do not close the tab until it + reports success. + Credentials live owner-only under `~/.config/ytstudio-cli/`. This step is one-shot per channel; do not re-run it unless auth is actually broken. @@ -160,6 +170,15 @@ and date range (`--days` or `-s/-e` start/end) are optional. When unsure which metric or dimension exists, list them first with `analytics metrics` / `analytics dimensions` instead of guessing names. +For `-d month` or `-d week`, both `-s` and `-e` must be the first day of a month; +the API rejects any other day and does not snap to one. The range is inclusive on +both ends, so the end month is the last month you want, not the month after. + +```bash +# 12 months, Jun 2025 through May 2026: +ytstudio analytics query -m views -d month -s 2025-06-01 -e 2026-05-01 +``` + ### comments - moderation ```bash From 387e2e95ec37c4f2b72a38f9f29d577af792294a Mon Sep 17 00:00:00 2001 From: Jelmer de Wit <1598297+jdwit@users.noreply.github.com> Date: Thu, 18 Jun 2026 10:54:42 +0200 Subject: [PATCH 2/2] docs: reflect automatic month/week date snapping in analytics query --- skills/ytstudio/SKILL.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/skills/ytstudio/SKILL.md b/skills/ytstudio/SKILL.md index b83409a..30cde4e 100644 --- a/skills/ytstudio/SKILL.md +++ b/skills/ytstudio/SKILL.md @@ -170,9 +170,10 @@ and date range (`--days` or `-s/-e` start/end) are optional. When unsure which metric or dimension exists, list them first with `analytics metrics` / `analytics dimensions` instead of guessing names. -For `-d month` or `-d week`, both `-s` and `-e` must be the first day of a month; -the API rejects any other day and does not snap to one. The range is inclusive on -both ends, so the end month is the last month you want, not the month after. +For `-d month` (and `-d week`), the CLI snaps `-s`/`-e` down to the boundary the +YouTube Analytics API requires (first of the month), so `--days` and arbitrary +dates just work. The range is inclusive on both ends, so the end month is the +last month you want, not the month after. ```bash # 12 months, Jun 2025 through May 2026: