メインコンテンツまでスキップ

一回限りのコードを MCP アクセスに交換する

POST /oauth/token

S256 verifier と正確なリダイレクト/リソースを指定した公開クライアントのフォーム要求です。MCP 専用 qm. トークンを返し、ワークスペース API 認証情報は返しません。一時間以内または残りセッション期間の早い方で期限切れになります。リフレッシュトークンはありません。コードを再使用すると許可を取り消します。

認証​

この操作に認証済みセッションは不要です。Origin 検査とリクエスト制限は引き続き適用されます。

[]

パラメーター​

[]

リクエスト本文​

{
"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"
]
}
}
}
}

レスポンス​

{
"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"
]
}
}
}
}
}

#/components/schemas/Asset などの参照は、共有スキーマで解決されます。クライアント生成には OpenAPI コントラクトをダウンロードしてください。このページは生成されたもので、計画中のエンドポイントではなく、実装済みの開発 API を説明します。