From 7ede74f3e25771e95b2b490d350df4e4f756dfe1 Mon Sep 17 00:00:00 2001 From: Markus Date: Fri, 18 Oct 2024 20:29:36 +0200 Subject: [PATCH] Update websocket.md (#2383) Clarify use of `accessToken` URL param in websocket url. Signed-off-by: Markus --- configuration/websocket.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/configuration/websocket.md b/configuration/websocket.md index 0e62301044..80cea4b6e8 100644 --- a/configuration/websocket.md +++ b/configuration/websocket.md @@ -12,14 +12,14 @@ All messages on the WebSocket connection are JSON encoded text-messages. ## Establishing a connection WebSockets are available on the same ports as the REST API, usually port 8080 for unsecured (ws-protocol) and port 8443 for secured (wss-protocol) connections. -The connection is established by connecting to `ws[s]://{URL}:{PORT}/ws`. +The connection is established by connecting to `ws[s]://{URL}:{PORT}/ws?accessToken={TOKEN}`. To prevent unauthorized use of the connection an `accessToken` has to be sent with the initial request. -Two authentication methods are available: +{TOKEN} can be one of these two: -1. API token: `oh.ohwstest.tz1IDPniKLxc0VU4t9tz4GiAiKmc0ZDdMKxhlD5tfviQStM4oNsywrcrUTktPbBE9YQ3wnMBrCqVEIhg7Q` +1. An API token: `oh.ohwstest.tz1IDPniKLxc0VU4t9tz4GiAiKmc0ZDdMKxhlD5tfviQStM4oNsywrcrUTktPbBE9YQ3wnMBrCqVEIhg7Q` -1. Basic Auth with username/password: `dXNlcjpwYXNzd29yZA==` +1. Basic Auth with base64 encoded {USER}:{PASSWORD}: `dXNlcjpwYXNzd29yZA==` ## Using the WebSocket connection