---
title: "TCP Proxy WebSocket Connection"
method: GET
path: "/v1/tcp-proxy/{token}"
tags: ["TCP Proxy"]
---

# TCP Proxy WebSocket Connection

`GET /v1/tcp-proxy/{token}`

Establish a WebSocket connection for TCP proxy data transfer. This endpoint
requires a valid session token obtained from `POST /v1/tcp-proxy`.

**Token Properties:**
- Single-use: token is invalidated upon WebSocket connection
- Short-lived: expires after 30 seconds if not used
- No authentication header needed: token in path serves as authorization

**WebSocket Protocol:**
- Binary frames (opcode 0x02) are used for data transfer in both directions
- Text frames (opcode 0x01) are used for control messages (JSON format)
- Close frame (opcode 0x08) terminates the connection

**Control Messages (JSON):**
- Connection ready: `TcpProxyConnectedMessage`, e.g. `{"type": "connected", "channelId": 12345}`
- Close notification: `TcpProxyCloseMessage`, e.g. `{"type": "close", "reason": "normal"}`

## Path parameters

- `token` string, uuid, required

## Other responses

- `101` — Switching Protocols - WebSocket connection established successfully. After upgrade, the connection enters WebSocket mode for bidirectional data transfer. A JSON message `{"type": "connected", "channelId": N}` is sent after successful upgrade. If the token is invalid, expired or already used, the connection is closed right after the upgrade with WebSocket close code 1008 (Policy Violation) - no HTTP error status is returned in that case.
- `426` — Upgrade required - request did not ask for a protocol upgrade to WebSocket.

## Changes

- **2026-09-04** `4e1f9580c5b0` — 3 info
  - added the media type `application/json` for the response with the status `101`
  - added the non-success response with the status `426`
  - removed the non-success response with the status `401`

[Change history](https://skmtc.dev/netxms/apis/netxms-api/changes/v1/tcp-proxy/:token/get.md)

---

[API](https://skmtc.dev/netxms/apis/netxms-api.md) · [All operations](https://skmtc.dev/netxms/apis/netxms-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/netxms/netxms-api/revisions/4e1f9580c5b0/schema)
