Admin API key is not working

Describe the Bug

Can’t use Cursor Admin API.
Already have admin permissions on our team.
Keep getting this response on any request from this page Cursor – Admin API

{“statusCode”:401,“error”:“Unauthorized”,“message”:“Invalid API key”}

Steps to Reproduce

curl -X GET https://api.cursor.com/teams/members
-u YOUR_API_KEY:{MY_CURSOR_ADMIN_API}

Expected Behavior

suppose to get an actual response from api with data from our account

Screenshots / Screen Recordings

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.1.6
VSCode Version: 1.96.2
Commit: 5b19bac7a947f54e4caa3eb7e4c5fbf832389850
Date: 2025-06-25T02:14:24.784Z
Electron: 34.5.1
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Darwin arm64 24.5.0

cc @danperks @IsaacHopkinson

Hey there! This is most likely an issue with the API key and how it’s being passed in. From the API docs, it’s passed in as a username with no password as basic auth.

Basic auth is just an authorization header in the format: Authorization: Basic Username:Password (where user:pass is base64 encoded). Since we don’t use a password in the docs, the equivalent JS code would be:

async function getCursorUsageData() {
  const response = await fetch('https://api.cursor.com/teams/members', {
    headers: {
      'Authorization': `Basic ${btoa(YOUR_API_KEY+':')}` //replace KEY with your key
    }
  });

Hope that makes sense!

1 Like