Updated on 2022-07-04 GMT+08:00

Establishing a WebSocket Connection

Description

This API is used to establish a meeting control WebSocket channel with the meeting server. You can obtain a connection establishment URL (wsURL) by calling the API for obtaining a meeting control token and use the wsURL in the prefix of the connection establishment request. If the request authentication fails, the meeting server automatically closes the WebSocket channel.

The server automatically releases the WebSocket connection after the meeting ends.

Prototype

Table 1 Prototype

Request Method

GET

Request Address

/cms/open/websocket/confctl/increment/conn

Transport Protocol

WSS

Request Parameters

Table 2 Parameters

Parameter

Mandatory

Type

Location

Description

confID

Yes

String

Query

Meeting ID.

tmpToken

Yes

String

Query

Token used for establishing a WebSocket connection. For details, see the wsToken API.

Example Request

GET wss://100.94.23.40/cms/open/websocket/confctl/increment/conn?confID=900726255&tmpToken=cnr6e88712f1c89a7b4e3b989596fc420fd43b45bf8ef35c1db HTTP/1.1
Host: 100.94.23.40
Connection: Upgrade
Pragma: no-cache
Cache-Control: no-cache
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36
Upgrade: websocket
Origin: https://100.94.23.40
Sec-WebSocket-Version: 13
Accept-Encoding: gzip, deflate, br
Accept-Language: zh-CN,zh;q=0.9,en;q=0.8
Cookie: CONFPORTALROUTE=canary; supportCookie=1
Sec-WebSocket-Key: wJ34Os631BNGJ1R72gQ/mQ==
Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits

Error Codes

If an error code starting with MMC or USG is returned when you use this API, rectify the fault by following the instructions provided in Huawei Cloud API Error Center.

Example cURL Command

curl -k -i -X GET 'wss://100.94.23.40/cms/open/websocket/confctl/increment/conn?confID=900726255&tmpToken=cnr6e88712f1c89a7b4e3b989596fc420fd43b45bf8ef35c1db'