Skip to content

API_ERROR on all commands — authentication and task commands fail despite HTTP 200 responses #384

Description

@adamschmideg

Environment

  • td version: 1.72.1
  • Node.js: v26.3.0
  • OS: Linux (Ubuntu)

Steps to reproduce

  1. Install @doist/todoist-cli globally
  2. Run td auth token <api-token>
  3. Run any command: td today, td inbox, td auth status

Expected

Commands authenticate and display results.

Actual

All commands return Error: API_ERROR immediately.

Diagnosis

The Todoist API itself responds correctly — curl with the same token returns HTTP 200 with valid JSON. Verbose CLI output confirms the API calls succeed before the error:

[td:info] fetch GET /api/v1/tasks/filter => 200 | duration_ms=400
Error: API_ERROR
terminated

The error occurs during response processing, not during the HTTP request. td auth token <token> also silently fails to save credentials — td doctor shows "No Todoist credentials found" and "Config file not created yet" after running it.

td doctor output:

WARN Config file is readable but contains unrecognized key "token"
WARN No Todoist credentials found. Set TODOIST_API_TOKEN or run td auth login

Workaround attempted

Setting TODOIST_API_TOKEN environment variable produces the same API_ERROR result.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions