QVeris
运行任务
文档目录

撤销 OAuth Token

POST /oauth/revoke

撤销 OAuth Token

REST API 概览 · OpenAPI JSON · OpenAPI YAML

接口契约

稳定性认证费用Operation ID
已发布Client ID;机密客户端使用 HTTP Basic免费revoke_api_v1_oauth_revoke_post

参数

此操作没有路径或查询参数。

请求体

Schema: inline

名称必填类型说明
tokenstring
token_type_hintstring | null
client_idstring | null

可运行示例

bash
curl --request POST \
  --url "https://qveris.ai/api/v1/oauth/revoke" \
  --data-urlencode 'token=YOUR_TOKEN' \
  --data-urlencode 'token_type_hint=access_token' \
  --data-urlencode 'client_id=YOUR_CLIENT_ID'
typescript
const response = await fetch("https://qveris.ai/api/v1/oauth/revoke", {
  method: "POST",
  body: new URLSearchParams(Object.entries({
  "token": "YOUR_TOKEN",
  "token_type_hint": "access_token",
  "client_id": "YOUR_CLIENT_ID"
}).map(([key, value]) => [key, String(value)])),
})

if (!response.ok) throw new Error(`QVeris request failed: ${response.status}`)
console.log(await response.json())
python
import json
import requests

response = requests.request(
    "POST",
    "https://qveris.ai/api/v1/oauth/revoke",
    data=json.loads(r'''{
  "token": "YOUR_TOKEN",
  "token_type_hint": "access_token",
  "client_id": "YOUR_CLIENT_ID"
}'''),
    timeout=30,
)
response.raise_for_status()
print(response.json())

响应

状态码含义Schema
200Successful Responseobject
400OAuth request or grant errorOAuthErrorResponse
401Client authentication or bearer-token errorOAuthErrorResponse
403Subject token has insufficient scopeOAuthErrorResponse
422Validation ErrorHTTPValidationError

成功响应示例

json
{}

精确契约

相关操作

POST 发现能力 · POST 检查能力 · POST 预检能力 · POST 调用能力

这个页面对你有帮助吗?