显示隧道令牌
POST/v1/tunnels/{tunnel_id}/reveal_token
Tunnels API 目前处于研究预览阶段。它需要 anthropic-beta: mcp-tunnels-2026-06-22 请求头,并且可能在没有弃用期的情况下发生变更。它取代了位于 /v1/organizations/tunnels 的 Admin API 端点,这些端点在迁移窗口期内仍然可用。
显示隧道的连接器令牌。该值在每次调用时实时获取;Anthropic 不会存储它。在令牌轮换之前,重复调用会返回相同的值。此操作以 POST 方式公开,以免令牌出现在中间环节的访问日志中。
Parameters
Returns
显示隧道令牌
<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
$client = new Client(apiKey: 'my-anthropic-api-key');
$betaTunnelToken = $client->beta->tunnels->revealToken(
'tunnel_id',
betas: [AnthropicBeta::MESSAGE_BATCHES_2024_09_24],
workspaceID: 'wrkspc_011CZkZaBF1tNoB5wlCeusgy',
);
var_dump($betaTunnelToken);Response 200
{
"id": "id",
"tunnel_token": "tunnel_token",
"type": "tunnel_token"
}Returns Examples
Response 200
{
"id": "id",
"tunnel_token": "tunnel_token",
"type": "tunnel_token"
}