---
title: "Start an authorization (browser redirect)"
method: GET
path: "/oauth/authorize"
tags: ["MCP OAuth"]
---

# Start an authorization (browser redirect)

`GET /oauth/authorize`

## Request

- Base URL: `https://api.elaichi.ai`
- URL: `https://api.elaichi.ai/oauth/authorize`
- Auth: none required

Validates the request, parks it server-side, and redirects the browser to Elaichi's consent screen — this endpoint never renders HTML and never returns a code directly. PKCE is mandatory: `code_challenge` with `code_challenge_method=S256`; an absent method is rejected rather than defaulting to `plain`. Nothing about the request travels through the browser afterwards — the redirect carries only an opaque request id, so there is nothing for a user-agent to tamper with. If the user is not signed in they are sent to login first and returned to the same consent URL. The consent screen then calls `GET /oauth/authorize-request/{id}` and one of approve/deny. Errors before the redirect URI is validated are rendered as an RFC 6749 error body (an unregistered URI must never be redirected to, or the error path becomes an open redirect); errors after it are appended to the registered redirect URI as `error`/`error_description` with `state` echoed back. Rate limited per `client_id`.

## Query parameters

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

## Other responses

- `302`: Redirect to the consent screen (or to login, then the consent screen), or back to the registered redirect URI carrying `error`/`error_description`/`state`.
- `400`: Rendered error (never a redirect): unknown `client_id`, missing or unregistered `redirect_uri`.
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not found
- `429`: Rate limited (`temporarily_unavailable`), with `Retry-After`.

---

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