Find your next open-source project

Search by name, purpose, or keyword — or paste a GitHub repository URL
All skills

adding-project-secret-api-key-auth

Wire a PostHog viewset action to accept project secret API key (PSAK) authentication.

When to use it

You have a project-scoped endpoint that should be callable by a service token instead of a logged-in user, and it currently only accepts session or personal API key auth.

For example

You say

Add PSAK auth to the endpoint run action in my PostHog viewset so a phs_ token with endpoint:read scope can call it.

You get
  • Scope allowlist entries
  • Authenticator and allowed actions
  • PSAK-aware throttles

How it works

  • Synthetic user has no real id and always fails permission checks, so object-level RBAC must be skipped for it.
  • Standard personal key throttles skip PSAK requests, so per-key and per-team PSAK throttles are needed.