---
title: "Oauth Authorize Get"
method: GET
path: "/oauth/authorize"
tags: ["OAuth"]
---

# Oauth Authorize Get

`GET /oauth/authorize`

## Request

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

OAuth 2.0 authorization endpoint (GET).

This endpoint validates the request and redirects to the consent page where the user
can select a project and authorize the client.

Implements RFC 6749 Section 4.1.1 (Authorization Request) and 4.1.2.1 (Error Response).

**SECURITY POLICY:** PKCE (RFC 7636) with S256 is REQUIRED for all clients.
Clients must provide code_challenge and code_challenge_method=S256 parameters.

RFC 8707: The `resource` parameter identifies the target resource server
for which the token will be issued.

Note: While RFC 6749 lists redirect_uri as OPTIONAL, Section 3.1.2 states it MUST be
included if multiple redirect URIs are registered. This implementation requires it.

## Query parameters

- `response_type` string, nullable
- `client_id` string, nullable
- `redirect_uri` string, nullable
- `scope` string, nullable
- `state` string, nullable
- `code_challenge` string, nullable
- `code_challenge_method` string, nullable
- `resource` string, nullable
- `request_uri` string, password, nullable

## Cookies

- `logfire_token` string, password, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `400`: Bad Request
- `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)
