---
title: "Log in and approve an MCP connection"
method: POST
path: "/api/oauth/authorize"
tags: ["MCP OAuth"]
---

# Log in and approve an MCP connection

`POST /api/oauth/authorize`

## Request

- Base URL: `https://slimlytics.com`
- URL: `https://slimlytics.com/api/oauth/authorize`
- Auth: none required

Requires the slyt_oauth_csrf cookie from the login form and its matching hidden csrf field.

## Query parameters

- `client_id` string, uuid, required
- `redirect_uri` string, uri, required
- `response_type` 'code', required
- `code_challenge` string, required
- `code_challenge_method` 'S256', required
- `resource` string, uri, required
- `scope` string
- `state` string

## Other responses

- `303`: Redirect to the registered callback with a one-time code (or error=access_denied when cancelled), state, and iss
- `400`: Invalid request
- `401`: Authentication required
- `403`: Insufficient site role
- `429`: Login rate limit exceeded

---

[API](https://skmtc.dev/slimlytics/apis/slimlytics-api.md) · [All operations](https://skmtc.dev/slimlytics/apis/slimlytics-api/llms.txt) · [OpenAPI document](https://skmtc.dev/slimlytics/apis/slimlytics-api/revisions/f9a26641a254?raw)
