Skip to content

issues list returns 403 even with valid token that works via REST API #3062

@jamesblackwell

Description

@jamesblackwell

CLI Version

3.0.1

Operating System and Architecture

  • macOS (arm64)
  • macOS (x86_64)
  • Linux (i686)
  • Linux (x86_64)
  • Linux (armv7)
  • Linux (aarch64)
  • Windows (i686)
  • Windows (x86_64)

Operating System Version

macOS 15.5 (Sequoia)

Link to reproduction repository

No response

CLI Command

sentry-cli issues list -o version-zero -p quizgecko-php-laravel --max-rows 10 -s unresolved

Exact Reproduction Steps

  1. Create a User Auth Token with full admin scopes (org:admin, event:admin, etc.)
    1. Configure token in ~/.sentryclirc
    1. Run sentry-cli issues list -o <org> -p <project> -s unresolved
    1. Get 403 error: "You do not have permission to perform this action"
      However, the same token works fine via REST API:
curl -s "https://sentry.io/api/0/organizations/<org>/issues/?project=<project_id>&query=is:unresolved" \
  -H "Authorization: Bearer $TOKEN"

Note: The CLI uses project slug in the URL (/api/0/projects/<org>/<project-slug>/issues/) but the REST API requires project ID as a query param. This may be the root cause.

Also: sentry-cli info misreports token scopes - shows only 4 scopes even when the token has full admin access.

Expected Results

The CLI should list issues from the project, same as the REST API does with the same token.

Actual Results

403 error: "You do not have permission to perform this action"

The CLI hits /api/0/projects/<org>/<project-slug>/issues/ which returns 403, while the working REST API uses /api/0/organizations/<org>/issues/?project=<project_id>

Logs

$ SENTRY_LOG_LEVEL=debug sentry-cli issues list -o version-zero -p quizgecko-php-laravel --max-rows 5

DEBUG x-sentry-proxy-url: http://10.2.0.67:8999/api/0/projects/version-zero/quizgecko-php-laravel/issues/
DEBUG body: {"detail":"You do not have permission to perform this action."}
error: API request failed
Caused by: sentry reported an error: You do not have permission to perform this action. (http status: 403)

Token scopes (from Sentry UI): alerts:read, alerts:write, event:admin, event:read, event:write, member:admin, member:invite, member:read, member:write, org:admin, org:integrations, org:read, org:write, project:admin, project:read, project:releases, project:write, team:admin, team:read, team:write

But sentry-cli info shows only: org:read, project:read, project:releases, project:write

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugIssue typeCLIProduct area

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions