Bug Description
First I tried to use Account API key which make sense because it will survive even when my profile will be removed from an account, but it fails.
Profile API keys works.
Steps to Reproduce
- Manage account -> Account API tokens (https://dash.cloudflare.com/xxx/api-tokens)
- Create key with correct permission
- Paste it to the installer
- See "Error: Invalid or expired token"
Expected Behavior
I can use Account API tokens.
Actual Behavior
Only User API Tokens are accepted by the installer.
Component
@counterscale/cli
Environment
- OS: macOS
- Node: v24.12.0
- Counterscale: 3.4.1
Additional Context
◇ Enter your Cloudflare API Token
│ ****************************************
│
◇ Token Validated
◇
Error: Invalid or expired token
at promptApiToken (file:///Users/Bobik/.npm/_npx/164780cfdaf17f99/node_modules/@counterscale/cli/dist/lib/ui.js:105:19)
at process.processTicksAndRejections (node:internal/process/task_queues:103:5)
at async install (file:///Users/Bobik/.npm/_npx/164780cfdaf17f99/node_modules/@counterscale/cli/dist/commands/install.js:155:30)
at async Object.handler (file:///Users/Bobik/.npm/_npx/164780cfdaf17f99/node_modules/@counterscale/cli/dist/index.js:30:5)
Bug Description
First I tried to use Account API key which make sense because it will survive even when my profile will be removed from an account, but it fails.
Profile API keys works.
Steps to Reproduce
Expected Behavior
I can use Account API tokens.
Actual Behavior
Only User API Tokens are accepted by the installer.
Component
@counterscale/cli
Environment
Additional Context
◇ Enter your Cloudflare API Token
│ ****************************************
│
◇ Token Validated
◇
Error: Invalid or expired token
at promptApiToken (file:///Users/Bobik/.npm/_npx/164780cfdaf17f99/node_modules/@counterscale/cli/dist/lib/ui.js:105:19)
at process.processTicksAndRejections (node:internal/process/task_queues:103:5)
at async install (file:///Users/Bobik/.npm/_npx/164780cfdaf17f99/node_modules/@counterscale/cli/dist/commands/install.js:155:30)
at async Object.handler (file:///Users/Bobik/.npm/_npx/164780cfdaf17f99/node_modules/@counterscale/cli/dist/index.js:30:5)