---
title: "Get an MCP authorization request"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.nicer.travel/llms.txt
> Use this file to discover all available pages before exploring further.

# Get an MCP authorization request

Path: Nicer API › Assistant

`GET /agent/mcp/authorizations/{requestId}`

URL: `https://api.nicer.travel/agent/mcp/authorizations/{requestId}`

Reads what an AI client asks for, for the portal's consent page: the client's name and client id as the client states them, the host its code would be sent to (`redirectHost`) and whether that is a program on the person's own computer (`isLocalRedirect`), the MCP server it would open (`surface`), the access its scopes preselect (`access`, `READ` or `WRITE`) and when the request expires. `requestId` is the last segment of the consent page's address, where Nicer's authorization server sent the person. Any signed-in person may read it with their own session, never with a token minted from a connection. Errors: 404 `ERROR_ITEM_NOT_FOUND` for a request that does not exist, has expired (ten minutes after the client made it) or was already approved or denied; 403 `ERROR_MCP_SESSION_REQUIRED` for a token minted from a connection.

## Authentication

- `bearerAuth`, http bearer, header `Authorization`, format `JWT`

## Path parameters

- `requestId` (`agent.mcp.authorizations.get.path.requestId`; string, required)

## Code samples

### JavaScript SDK

```javascript
import { createClient } from "@nicertravel/sdk";

const nicer = createClient({
  baseUrl: "https://api.nicer.travel",
  token: process.env.NICER_TOKEN,
});

await nicer.agent.mcp.authorizations.get({
  "requestId": "string"
});
```

### Nicer CLI

```bash
nicer agent mcp authorizations get --request-id 'string'
```

### cURL

```bash
curl --request GET \
  --url 'https://api.nicer.travel/agent/mcp/authorizations/<requestId>' \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://api.nicer.travel/agent/mcp/authorizations/<requestId>';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.nicer.travel/agent/mcp/authorizations/<requestId>"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

OK

#### Example

```json
{
  "clientName": "string",
  "clientId": "string",
  "redirectHost": "string",
  "isLocalRedirect": true,
  "surface": "ADVISOR",
  "access": "READ",
  "expiresAt": "2019-08-24T14:15:22Z"
}
```

- `clientName` (`agent.mcp.authorizations.get.response.200.clientName`; string, required) — The AI client's name as the client states it in its metadata (client_name); Nicer does not verify it. Its client id when it states none.
  - minLength: `1`
- `clientId` (`agent.mcp.authorizations.get.response.200.clientId`; string, required) — The client's OAuth client_id: the HTTPS address of its client metadata document, or the id Nicer gave it when it registered.
  - minLength: `1`
- `redirectHost` (`agent.mcp.authorizations.get.response.200.redirectHost`; string, required) — Where the client receives its code, as a person reads it: the host of its redirect URI, such as an assistant's website or 127.0.0.1. Redirect URIs are HTTPS or loopback HTTP only.
  - minLength: `1`
- `isLocalRedirect` (`agent.mcp.authorizations.get.response.200.isLocalRedirect`; boolean, required) — Whether the code goes to a program on the person's own computer rather than to a website: a loopback address (127.0.0.1, [::1] or localhost). The consent page says so.
- `surface` (`agent.mcp.authorizations.get.response.200.surface`; string, required) — Which MCP server the connection opens. ADVISOR is mcp.<env>/mcp, acting as the person in the agencies they belong to and never with staff rights. INTERNAL is mcp.<env>/internal, for Nicer staff only, in every agency.
  - one of `"ADVISOR"`, `"INTERNAL"`
- `access` (`agent.mcp.authorizations.get.response.200.access`; string, required) — The access the consent page preselects, read from the scopes of the client's request: READ or WRITE, never MONEY. The person picks READ, WRITE or MONEY when approving.
  - one of `"READ"`, `"WRITE"`, `"MONEY"`
- `expiresAt` (`agent.mcp.authorizations.get.response.200.expiresAt`; string, required) — When the request expires: ten minutes after the client made it. After that it is a 404 and the client must start again.
  - format: `date-time` · pattern: `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$`

### 400

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`agent.mcp.authorizations.get.response.400.errorCode`; string, required)
- `errorMessage` (`agent.mcp.authorizations.get.response.400.errorMessage`; string, required)

### 401

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`agent.mcp.authorizations.get.response.401.errorCode`; string, required)
- `errorMessage` (`agent.mcp.authorizations.get.response.401.errorMessage`; string, required)

### 403

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`agent.mcp.authorizations.get.response.403.errorCode`; string, required)
- `errorMessage` (`agent.mcp.authorizations.get.response.403.errorMessage`; string, required)


Source: https://docs.nicer.travel/api/Assistant/agent.mcp.authorizations.get/index.md
