Skip to content

v1.22.1

Latest

Choose a tag to compare

@github-actions github-actions released this 01 Aug 04:38

Fixes: /admin/usage rejected valid Cloudflare API tokens.

If your usage dashboard showed "The CF_API_TOKEN currently configured did not validate" with http_401, this release is the fix — and your token was almost certainly fine.

Cloudflare issues two kinds of API token, each verifiable only at its own endpoint. Garrul checked /user/tokens/verify exclusively, so account-owned tokens (the cfat-prefixed kind the current dashboard hands out) always came back 401, no matter how valid or correctly scoped they were. The page failed closed before ever reaching the analytics queries, which would have worked.

Garrul now probes /accounts/{id}/tokens/verify first and falls back to the user endpoint, so both token kinds verify. If both probes fail, the error names each one instead of showing a single ambiguous code.

Notes:

  • No config changes. No new env vars, no migrations — deploy and reload /admin/usage.
  • If you re-created a token while chasing this, the old one likely still works; nothing here requires rotating it.
  • The token-error page previously blamed a wrong CF_ACCOUNT_ID or a dropped scope. Neither can cause it: the account endpoint verifies the bearer alone and ignores the ID in its path, so a wrong account ID passes verification and instead surfaces as a per-panel account_not_found. The copy now says so.