Skip to content

A code or a refresh token for an access token

POST
/oauth/token
curl --request POST \
--url https://beta-api.plune.ai/oauth/token \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data grant_type=authorization_code \
--data client_id=example \
--data resource=example \
--data code=example \
--data redirect_uri=example \
--data code_verifier=example \
--data refresh_token=example

Form-encoded. grant_type=authorization_code with code, client_id, redirect_uri, code_verifier and resource; grant_type=refresh_token with refresh_token, client_id and resource. A code works once and for 60 seconds; the access token lives an hour and is good for the MCP endpoint only (/v1 does not take it); each refresh issues a new refresh token and ends the one presented. A code or a refresh token presented a second time revokes the connection. A connection nobody used for 90 days cannot be refreshed. Every such refusal is invalid_grant. Sent with Cache-Control: no-store. 300 requests in 15 minutes from one client address. Mounted only where the remote MCP server is switched on (MCP_PUBLIC_URL); elsewhere 404.

Media type application/x-www-form-urlencoded
object
grant_type
required
string
Allowed values: authorization_code refresh_token
client_id
required
string
resource
required
string
code
string
redirect_uri
string
code_verifier
string
refresh_token
string

The pair

Media type application/json
object
access_token
required
string
token_type
required
string
Allowed values: Bearer
expires_in
required
integer
refresh_token
required
string
scope
required
string
Allowed values: read write
Example
{
"access_token": "plune_oat_EXAMPLE",
"token_type": "Bearer",
"expires_in": 3600,
"refresh_token": "plune_ort_EXAMPLE",
"scope": "read"
}

invalid_grant or unsupported_grant_type

Media type application/json
object
error
required
string
error_description
string
Example
{
"error": "invalid_grant"
}

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