Skip to main content

Establishes WebSocket connection with channel and subtopic

GET 

wss://apis.<domain>/iot/ws/channels/:id/messages/:subtopic

Establishes WebSocket connection with the specified channel and subtopic. This endpoint is used to establish a connection that can be used to receive real-time messages from a specific subtopic within a channel.

Request

Path Parameters

    id uuidrequired

    Unique channel identifier.

    subtopic stringrequired

    Subtopic to subscribe to, can include multiple segments

Responses

WebSocket connection established successfully.

Authorization: http

name: thingAuthtype: httpscheme: bearerdescription: * Things access: `Authorization: Thing <thing_key>`
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "wss://apis.<domain>/iot/ws/channels/:id/messages/:subtopic");
request.Headers.Add("Authorization", "Bearer <token>");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Request Collapse all
Base URL
wss://apis.<domain>
Auth
Parameters
— pathrequired
— pathrequired