Chapter 07 · Prisma Postgres Setup
Subchapter 7.2
references/auth.mdMarkdown1 KBView on GitHub
How to authenticate with the Prisma Management API using service tokens.
Service tokens authenticate server-to-server requests. They are scoped to a workspace and grant access to all resources within it.
Set the token as an environment variable:
export PRISMA_SERVICE_TOKEN="eyJ..."Include it in the Authorization header of every API request:
curl -H "Authorization: Bearer $PRISMA_SERVICE_TOKEN" \
https://api.prisma.io/v1/projectsService tokens are workspace-scoped. A single token grants access to all projects, databases, and connections within the workspace. There are no project-scoped tokens at this time.
.env to .gitignore to prevent accidental commitsOAuth is used when acting on behalf of a user, typically in partner/integrator flows. See the prisma-postgres-integrator skill for OAuth details.
For standard database setup, service tokens are the recommended authentication method.