Claude Platform Docs

Rotacionar token do túnel

$ ant beta:tunnels rotate-token
POST/v1/tunnels/{tunnel_id}/rotate_token

A API Tunnels está em "research preview" (prévia de pesquisa). Ela requer o cabeçalho anthropic-beta: mcp-tunnels-2026-06-22 e pode mudar sem um período de descontinuação. Ela substitui os endpoints da Admin API em /v1/organizations/tunnels, que permanecem disponíveis durante uma janela de migração.

Rotaciona o token de conector de um túnel. A rotação invalida o token atual para novas conexões e retorna um novo valor; conexões já estabelecidas não são interrompidas. Um conector reiniciado após a rotação deve usar o novo valor.

Parameters
--tunnel-id: string

Path param: Path parameter tunnel_id

--reason: optional string

Body param: Optional free-text reason for the rotation, recorded for audit.

maxLength1024
--beta: optional array of AnthropicBeta

Header param: Optional header to specify the beta version(s) you want to use.

Returns
beta_tunnel_token: object{ id, tunnel_token, type }

A tunnel's connector token.

id: string

Stable identifier for the current token value. Changes when the token is rotated.

tunnel_token: string

The connector token used to run the tunnel. Treat as a credential.

type: "tunnel_token"
Rotacionar token do túnel
ant beta:tunnels rotate-token \
  --api-key my-anthropic-api-key \
  --tunnel-id tunnel_id
Returns Examples
Response 200
{
  "id": "id",
  "tunnel_token": "tunnel_token",
  "type": "tunnel_token"
}