# Start Sign in with Plotwork

> Page: https://docs.plotwork.dev/api/get-oauth-authorize. Index of every page: https://docs.plotwork.dev/llms.txt

The app sends the browser here with response_type=code, client_id, redirect_uri, scope, state and a PKCE S256 challenge.

`GET /oauth/authorize`

## TL;DR

| Question | Answer |
|---|---|
| What does it do? | Start Sign in with Plotwork. |
| What does it take? | `response_type`, `client_id`, `redirect_uri`, `scope`, `state`, `code_challenge`, `code_challenge_method` in the query string. |
| What does it return? | Status 200 with no body. |
| What can go wrong? | `302` to the consent page, or back to the app with an error; `400` no app has that client_id (oauth.invalid_client), or the redirect_uri is not one it registered (oauth.invalid_redirect_uri); `429` too many requests; `503` sign in with Plotwork is not available on this server (oauth.unavailable). Every failure uses the one error envelope. |

## What it does

The app sends the browser here with response_type=code, client_id, redirect_uri, scope, state and a PKCE S256 challenge. The API checks the app and the address, signs the request, and redirects to the portal's consent page. An unknown app or an unregistered address is a 400 here, never a redirect; any other mistake goes back to the app's address with OAuth's error.

## Query parameters

| Field | Type | Required | Description |
|---|---|---|---|
| `response_type` | `string` | no |  |
| `client_id` | `string` | no |  |
| `redirect_uri` | `string` | no |  |
| `scope` | `string` | no |  |
| `state` | `string` | no |  |
| `code_challenge` | `string` | no |  |
| `code_challenge_method` | `string` | no |  |

## Responses

| Status | Meaning | Body |
|---|---|---|
| 302 | To the consent page, or back to the app with an error. | none |
| 400 | No app has that client_id (oauth.invalid_client), or the redirect_uri is not one it registered (oauth.invalid_redirect_uri). | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 429 | Too many requests. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 503 | Sign in with Plotwork is not available on this server (oauth.unavailable). | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |

## See also

| Doc | Why |
|---|---|
| [API reference](https://docs.plotwork.dev/api/reference.md) | Every endpoint, and the error envelope |
| [Schemas](https://docs.plotwork.dev/api/schemas.md) | Every request and response type |
| [Tool reference](https://docs.plotwork.dev/mcp/tools.md) | The operations as callable tools |
