# Get an agent's sign-in request

`GET /api/v1/oauth/requests/{requestId}`

An agent's request to sign in with the person's account, waiting for their decision on the consent screen.

Sign-in: a dashboard session only. API tokens and OAuth sign-ins get `403 token.not_allowed`.

Section: OAuth consent. Operation id in openapi.json: `get_oauth_request`.

## Parameters

| Name | In | Required | Type | Description |
|---|---|---|---|---|
| `requestId` | path | yes | string (uuid) | The sign-in request's id, from the consent screen's address. |

## Responses

Errors are `application/problem+json` (`Problem`); branch on `type`.

### 200

The request.

`application/json`: OAuthRequestView

| Field | Type | Required | Description |
|---|---|---|---|
| `client` | OAuthClientView | yes |  |
| `expiresAt` | string | yes | Decide before this instant. |
| `id` | string (uuid) | yes |  |
| `redirectHost` | string | yes | Host of `redirectUri` (`127.0.0.1` for local agents). |
| `redirectUri` | string | yes | Where the code goes after approval. |
| `requestedScopes` | array of Scope | yes | Monitorly scopes the client asked for; empty: it did not narrow them. |
| `resource` | string | yes | The MCP endpoint the token will work at. |

### 400

Bad Request.

- `auth.credentials_conflict`: the request carries both a session cookie and a token

### 401

Unauthorized.

- `auth.unauthenticated`, `auth.session_expired`: no session, or it ended
- `token.invalid`: the token is malformed, unknown, revoked or expired, or its creator left the workspace

### 403

Forbidden.

- `auth.forbidden`: your role is too low for this
- `token.not_allowed`: this operation needs a signed-in session; tokens cannot call it

### 404

Not Found.

- `request.not_found`: it does not exist, or you cannot see it

### 409

Conflict.

- `oauth.request_decided`: sign-in request was already approved or rejected

### 410

Gone.

- `oauth.request_expired`: MCP client sign-in request is older than 10 minutes: sign-in must be started again in the client

Schemas named above are listed with their fields in [the schema list](https://docs.monitorly.cloud/api/reference/schemas.md).
