Skip to content
Latchkey

sentry-cli "403 ... project not found" in CI

sentry-cli authenticated successfully but the org or project you named is not visible to that token: Sentry answers 403 or reports the project slug does not exist. The credential is valid; the target is wrong.

What this error means

sentry-cli fails with "403 Forbidden" or "A project with the slug '...' does not exist in the organization '...'", usually right after the token was accepted.

sentry-cli
error: API request failed
  caused by: sentry reported an error: A project with the slug 'web-frontend' does not exist in the organization 'my-org' (http status: 404)

Common causes

The org or project slug is misspelled

The --org/--project flags or .sentryclirc defaults point at a slug that does not match the real Sentry project, so the lookup fails.

The token lacks scope for that project

A 403 means the token authenticated but is not authorized for this project or org, often an org-scoped token missing project read/write.

How to fix it

Use the exact org and project slugs

  1. Copy the org and project slug from the Sentry URL or project settings.
  2. Set them as SENTRY_ORG and SENTRY_PROJECT or pass --org/--project.
  3. Re-run to confirm the project resolves.
.github/workflows/ci.yml
env:
  SENTRY_ORG: my-org
  SENTRY_PROJECT: my-project

Grant the token project scope

For a persistent 403, recreate the auth token with project:read and project:releases (or org:read) so it can act on that project.

How to prevent it

  • Pull org/project slugs from the Sentry URL, not from memory.
  • Scope tokens to the projects the pipeline touches.
  • Set SENTRY_ORG/SENTRY_PROJECT once at the job level.

Frequently asked questions

What causes ""403 ... project not found""?
The --org/--project flags or .sentryclirc defaults point at a slug that does not match the real Sentry project, so the lookup fails.
How do I fix "403 ... project not found"?
Use the exact org and project slugs

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card