Claude Platform Docs

Effectuer la rotation du jeton d'un tunnel

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

L'API Tunnels est en « research preview » (aperçu de recherche). Elle nécessite l'en-tête anthropic-beta: mcp-tunnels-2026-06-22 et peut changer sans période de dépréciation. Elle remplace les points de terminaison de l'Admin API situés sous /v1/organizations/tunnels, qui restent disponibles pendant une fenêtre de migration.

Effectue la rotation du jeton de connecteur d'un tunnel. La rotation invalide le jeton actuel pour les nouvelles connexions et renvoie une nouvelle valeur ; les connexions établies ne sont pas interrompues. Un connecteur redémarré après la rotation doit utiliser la nouvelle valeur.

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"
Effectuer la rotation du jeton d'un tunnel
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"
}