Zum Hauptinhalt springen

Einmaligen Code gegen MCP-Zugriff eintauschen

POST /oauth/token

Formularanfrage eines öffentlichen Clients mit S256-Verifizierer und exakter Weiterleitung/Ressource. Gibt ein qm.-Token ausschließlich für MCP zurück, niemals Workspace-API-Zugangsdaten. Läuft innerhalb einer Stunde oder der verbleibenden Sitzungsdauer ab, je nachdem, was früher eintritt. Kein Refresh-Token. Wiederholen eines Codes widerruft seine Freigabe.

Authentifizierung​

Dieser Vorgang erfordert keine authentifizierte Sitzung. Origin-Prüfungen und Anfragebegrenzungen gelten weiterhin.

[]

Parameter​

[]

Anfrageinhalt​

{
"required": true,
"content": {
"application/x-www-form-urlencoded": {
"schema": {
"type": "object",
"properties": {
"client_id": {
"type": "string"
},
"grant_type": {
"const": "authorization_code"
},
"code": {
"type": "string"
},
"code_verifier": {
"type": "string",
"minLength": 43,
"maxLength": 128
},
"redirect_uri": {
"type": "string"
},
"resource": {
"const": "https://qscan.dev/mcp"
}
},
"required": [
"client_id",
"grant_type",
"code",
"code_verifier",
"redirect_uri",
"resource"
]
}
}
}
}

Antworten​

{
"200": {
"description": "MCP-only bearer",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"access_token": {
"type": "string"
},
"token_type": {
"const": "Bearer"
},
"expires_in": {
"type": "integer"
},
"scope": {
"const": "mcp:tools"
}
},
"required": [
"access_token",
"token_type",
"expires_in",
"scope"
]
}
}
}
},
"400": {
"description": "OAuth error; tokens and request bodies must not be logged",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string"
},
"error_description": {
"type": "string"
}
},
"required": [
"error"
]
}
}
}
},
"401": {
"description": "OAuth error; tokens and request bodies must not be logged",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string"
},
"error_description": {
"type": "string"
}
},
"required": [
"error"
]
}
}
}
},
"403": {
"description": "OAuth error; tokens and request bodies must not be logged",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string"
},
"error_description": {
"type": "string"
}
},
"required": [
"error"
]
}
}
}
},
"413": {
"description": "OAuth error; tokens and request bodies must not be logged",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string"
},
"error_description": {
"type": "string"
}
},
"required": [
"error"
]
}
}
}
},
"415": {
"description": "OAuth error; tokens and request bodies must not be logged",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string"
},
"error_description": {
"type": "string"
}
},
"required": [
"error"
]
}
}
}
},
"429": {
"description": "OAuth error; tokens and request bodies must not be logged",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string"
},
"error_description": {
"type": "string"
}
},
"required": [
"error"
]
}
}
}
},
"503": {
"description": "OAuth error; tokens and request bodies must not be logged",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string"
},
"error_description": {
"type": "string"
}
},
"required": [
"error"
]
}
}
}
}
}

Referenzen wie #/components/schemas/Asset werden in den gemeinsamen Schemas aufgelöst. Lade den OpenAPI-Vertrag zur Clientgenerierung herunter. Diese Seite wird generiert; sie beschreibt die implementierte Entwicklungs-API, keine geplanten Endpunkte.