显示隧道令牌
post /v1/organizations/tunnels/{tunnel_id}/reveal_token
返回隧道的当前连接令牌。
该值在每次调用时实时获取;Anthropic 不存储该值。重复调用返回相同的值,直到令牌被轮换。使用 POST 方式暴露,以避免令牌出现在中间访问日志中。
路径参数
-
tunnel_id: string隧道的 ID。
请求头参数
-
"anthropic-beta": array of "mcp-tunnels-2026-05-19"所有隧道端点都需要此参数。
"mcp-tunnels-2026-05-19"
返回值
-
id: string当前令牌值的稳定标识符。令牌轮换时会更改。
-
tunnel_token: string隧道的连接令牌。
-
type: "tunnel_token"对象类型。隧道令牌始终为
tunnel_token。"tunnel_token"
示例
curl https://api.anthropic.com/v1/organizations/tunnels/$TUNNEL_ID/reveal_token \
-X POST \
-H 'anthropic-version: 2023-06-01' \
-H "Authorization: Bearer $ANTHROPIC_WIF_BEARER_TOKEN"
响应
{
"id": "ttkn_bb97000eaec162831399ca9b6684a4fdf5be49ace5683057b017aab5c87e19e0",
"tunnel_token": "eyJhIjoiRVhBTVBMRSIsInQiOiJFWEFNUExFIiwicyI6IkVYQU1QTEUifQ==",
"type": "tunnel_token"
}