Skip to main content

Exchange an Apollo OAuth authorization code

Immutable Catalog Entry

This descriptor comes from the active versioned Portal catalog.

WRITEapollo.apollo_oauth_exchange_code
  • Contract tier: legacy
  • Risk: write
  • Catalog version: 1.0.2
  • Descriptor hash: 18c7f0ef7c5aab5aa9ff8c270171eac1a17005ed177f2d2a4c77fc31c0a36338

Use this legacy credential helper to exchange a short-lived Apollo authorization code. It contacts Apollo and may return sensitive OAuth tokens, so callers must never log or persist the result outside an approved credential store. It does not change Apollo workspace records.

Request Body

{
"jsonrpc": "2.0",
"id": "apollo-apollo-oauth-exchange-code-example",
"method": "tools/call",
"params": {
"name": "apollo.apollo_oauth_exchange_code",
"arguments": {
"code": "code_example",
"client_id": "client_id_123",
"client_secret": "client_secret_example",
"redirect_uri": "redirect_uri_example"
}
}
}

Arguments Schema

{
"type": "object",
"required": [
"code",
"client_id",
"client_secret",
"redirect_uri"
],
"properties": {
"code": {
"type": "string",
"minLength": 1,
"description": "Short-lived Apollo authorization code."
},
"client_id": {
"type": "string",
"minLength": 1,
"description": "Apollo OAuth application client ID."
},
"redirect_uri": {
"type": "string",
"minLength": 1,
"description": "Exact redirect URI used for authorization."
},
"client_secret": {
"type": "string",
"minLength": 1,
"description": "Apollo OAuth application client secret; never log this value."
}
},
"additionalProperties": false
}

Output Schema

{
"type": "object",
"required": [
"ok",
"data",
"error",
"meta"
],
"properties": {
"ok": {
"type": "boolean",
"description": "Whether the requested operation completed successfully."
},
"data": {
"anyOf": [
{
"anyOf": [
{
"type": "object",
"additionalProperties": true
},
{
"type": "array",
"items": {}
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
}
],
"description": "Normalized provider or navigation result."
},
{
"type": "null"
}
],
"default": null,
"description": "Normalized provider or navigation result."
},
"meta": {
"type": "object",
"description": "Safe request, pagination, and truncation metadata.",
"additionalProperties": true
},
"error": {
"anyOf": [
{
"type": "object",
"description": "Safe error details when ok is false.",
"additionalProperties": true
},
{
"type": "null"
}
],
"default": null,
"description": "Safe error details when ok is false."
}
},
"description": "Apollo MCP normalized response envelope.",
"additionalProperties": false
}

Code Examples

curl -X POST 'https://portal.madpanda3d.com/api/mcp' \
-H 'Authorization: Bearer mad_live_***' \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "apollo-apollo-oauth-exchange-code-example",
"method": "tools/call",
"params": {
"name": "apollo.apollo_oauth_exchange_code",
"arguments": {
"code": "code_example",
"client_id": "client_id_123",
"client_secret": "client_secret_example",
"redirect_uri": "redirect_uri_example"
}
}
}'

Example Responses

{
"ok": true,
"message": "Tool apollo.apollo_oauth_exchange_code executed successfully.",
"note": "Response shape varies by MCP tool. Inspect live responses for exact fields."
}