POST/v1/oauth/revoke
Stable2026-04-01幂等Try it

OAuthAuthorizationService.RevokeToken

吊销 Token

吊销访问 token 或刷新 token(RFC 7009)。

Authentication

无需鉴权

该接口为公共接口,可直接调用;如携带 OAuth 2.0 access_token 或 API Key 也不会被拒绝。

Request body · RevokeTokenRequest

字段类型必填描述
tokenstring—要吊销的 token(access 或 refresh)
token_type_hintstring—"access_token" 或 "refresh_token"
client_idstring——
client_secretstring——

Response

200 OK · RevokeTokenResponse

Empty object.

错误响应 · google.rpc.Status

非 2xx 响应均按 AIP-193 规范包装为google.rpc.Status,含 code /message /details 三段。details[].reason 是机器可读的具体错误原因码,可用于客户端分支处理。

字段类型必填描述
codeinteger (int32)—The status code, which should be an enum value of google.rpc.Code.
messagestring—A developer-facing error message.
detailsarray<Any>—A list of messages that carry the error details.

Examples

curl -X POST \
  'https://api.appforges.com/v1/oauth/revoke' \
  -H 'Authorization: Bearer $ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "token": "string",
    "token_type_hint": "string",
    "client_id": "string",
    "client_secret": "string"
  }'
OpenAPI spec v0.59.4 · synced 10/11/2026, 11:27:14 PM