Skip to content

Connect the assistant to one project

POST
/v1/oauth/requests/{id}/approve
curl --request POST \
--url https://beta-api.plune.ai/v1/oauth/requests/example/approve \
--header 'Content-Type: application/json' \
--cookie plune_session=<plune_session> \
--data '{ "projectId": "u-shop::default", "scope": "read" }'

The person’s yes: one project they are a member of, and a right no wider than the request asked for. A reader of the project gives read only; the plan of the project must include the remote MCP server. At most 20 connections a person. The answer is the client’s return address with code, state and iss; the page sends the browser there. 30 a minute a person. The signed-in session alone (an API token gets 401): a token, an assistant’s own included, can neither grant a connection nor widen one. Mounted only where the remote MCP server is switched on (MCP_PUBLIC_URL).

id
required
string

The request id.

Media type application/json
object
projectId
required
string
scope
required
string
Allowed values: read write
Example
{
"projectId": "u-shop::default",
"scope": "read"
}

Connected

Media type application/json
object
connectionId
required
string
redirectTo
required
string
Example
{
"connectionId": "0b0f6a52-0e0f-4d0e-9d0a-5a1c5f6e7a10",
"redirectTo": "https://assistant.example/callback?code=EXAMPLE&state=s1&iss=https%3A%2F%2Fmcp.plune.ai"
}

The body is not {projectId, scope}

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}

No / invalid session

reader_grants_read_only, wider_than_asked, or the plan does not include the remote MCP server

Media type application/json
object
error
required
string
Example
{
"error": "the assistant asked for the read right; a wider one cannot be given",
"code": "wider_than_asked"
}

The request is gone, or the person is not in the project

Media type application/json
object
error
required
string
Example
{
"error": "the request is unknown, already answered or older than 10 minutes",
"code": "request_gone"
}

The person already holds the most connections

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}

Rate-limited: the per-route throttle, or the per-minute request limit of the plan an API token counts by (#1442; the body names the plan, #2092). Retry-After carries the seconds until the window rolls over.

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}
Retry-After
integer

Seconds until the window rolls over