/v0/repositories endpoint returns 401 despite valid API key

Where does the bug appear (feature/product)?

Somewhere else…

Describe the Bug

The GET /v0/repositories endpoint returns a 401 Authentication error even when using a freshly generated, valid Cloud Agents API key via Basic authentication.

Additional context:

The same API key works correctly for all other Cloud Agent endpoints (POST /v0/agents, GET /v0/agents/:id, etc.)
The error message references “logging in/out” which is unusual for API key authentication — it suggests the endpoint internally relies on a GitHub OAuth session associated with the Cursor account, rather than just the API key

The auth format used matches exactly what the docs specify (Authorization: Basic base64(apiKey:))

Steps to Reproduce

Steps to reproduce:

Generate a new User API Key from cursor.com/dashboard/cloud-agents
Make a request to the repositories endpoint using the documented auth format:
curl --request GET
–url https://api.cursor.com/v0/repositories
-u “YOUR_API_KEY:”

Expected Behavior

A 200 response with the list of accessible GitHub repositories.

Actual behaviour:
HTTP/2 401
{“error”:“Authentication error: If you are logged in, try logging out and back in.”}

Operating System

MacOS

Version Information

Version: 2.6.19 (Universal)
VSCode Version: 1.105.1
Commit: 224838f96445be37e3db643a163a817c15b36060
Date: 2026-03-12T04:07:27.435Z
Build Type: Stable
Release Track: Default
Electron: 39.4.0
Chromium: 142.0.7444.265
Node.js: 22.22.0
V8: 14.2.231.22-electron.0
OS: Darwin arm64 25.3.0

Does this stop you from using Cursor

No - Cursor works, but with this issue

1 Like

I am seeing this as well.

/v0/agents works just fine, but /v0/repositories give the error mentioned above.

Same here, also breaks our Notion > Cursor agent workflow

Hi Joe!

Thank you for the detailed report. This is a confirmed bug. A recent backend change inadvertently broke authentication for the GET /v0/repositories endpoint when called with API key (Basic auth). Other endpoints, like POST /v0/agents and GET /v0/agents/:id, are unaffected, which matches what you and @michaelrios, @Kajetan20 observed.

I’ve flagged this for our engineering team for a fix. I’ll follow up here once it’s resolved.

In the meantime, if you need to see your available repositories, you can do so through the Cloud Agents dashboard as a temporary workaround.

1 Like

A fix for this went out late last week! Please give it another try @Kajetan20 and @Joe_Thompson !