---
title: "Oauth Grantable Scopes"
method: GET
path: "/oauth/grantable-scopes"
tags: ["OAuth"]
---

# Oauth Grantable Scopes

`GET /oauth/grantable-scopes`

## Request

- Base URL: `https://logfire-api.pydantic.dev/api`
- URL: `https://logfire-api.pydantic.dev/api/oauth/grantable-scopes`
- Auth: none declared
- TypeScript: <https://skmtc.dev/pydantic/apis/pydantic-logfire-api/docs/oauth/grantable-scopes/get.ts> (a function with typed inputs; its response is checked against the schema)

Return the subset of `scopes` the authenticated user can actually grant.

Used by the consent UI to show which scopes the current user can grant for the
currently-selected org/project, so the user isn't asked to approve scopes that
would be silently filtered server-side during the POST /authorize step.

The OIDC scopes (e.g. `openid`) are passed through. Platform resource scopes are
filtered by permissions, and a scope that the platform does not know is dropped.

## Query parameters

- `organization_id` string, uuid, required
- `scopes` string, required: Space-separated list of scopes to check
- `project_id` string, uuid, nullable

## Cookies

- `logfire_token` string, password, nullable

## Response `200`

Successful Response

- GrantableScopesResponse: Subset of `scopes` the authenticated user can grant in the given org/project.
  - `grantable_scopes` string[], required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/pydantic/apis/pydantic-logfire-api.md) - [All operations](https://skmtc.dev/pydantic/apis/pydantic-logfire-api/llms.txt) - [OpenAPI document](https://skmtc.dev/pydantic/apis/pydantic-logfire-api/revisions/7996e45256f4?raw)
