Updated on 2025-11-13 GMT+08:00

Obtaining Co-browsing Connection Information

Function

This interface is invoked to obtain co-browsing connection information.

Usage Description

  • Prerequisites

    The web channel configuration has been correctly created.

Interface Prototype

Table 1 Interface prototype description

Method

POST

URL

https://{IP address}:{Port number}/service-cloud/rest/webadapter/v1/connectionInfo/getConnectionInfo

{IP address}:{Port number} indicates the IP address and port number of the NSLB exposed externally.

Table 2 Request header parameters

Parameter

Mandatory or Not

Type

Default Value

Description

Content-Type

Yes

String

None

The value is fixed at application/json; charset=UTF-8.

Cookie

Yes

String

None

During page integration, the CC-Messaging writes the value of ccmessaging-token to browser cookies through the request response. When invoking this interface independently, ensure that the cookie in the request header contains ccmessaging-token=xxx, where xxx indicates the value of ccmessaging-token.

Request Parameters

Parameter

Mandatory or Not

Type

Description

roomId

Yes

String

Room ID, which is passed as the multimedia call ID.

userId

Yes

String

User ID.

userName

Yes

String

Username.

role

Yes

String

Role type. The value can be recorder or replayer (observer).

Response Parameters

Parameter

Mandatory or Not

Type

Description

retCode

Yes

String

Interface response code. The value 0 indicates success.

retMsg

No

String

Interface description.

data

No

Object

Co-browsing connection information.

Table 3 data parameters

Parameter

Mandatory or Not

Type

Description

roomId

No

String

Room ID.

wssUrl

No

String

Internal WebSocket connection address. The IP addresses of multiple nodes are registered with ZooKeeper (or the Redis) and need to be queried in ZooKeeper (or the Redis).

wssUrlOut

No

String

External WebSocket connection address. The IP address is stored in the CC-Provision and needs to be queried by invoking the CC-Provision interface.

signature

No

String

-

Example

  • Request
    POST /service-cloud/rest/webadapter/v1/connectionInfo/getConnectionInfo
    
    host: 10.10.10.2:18446
    connection: Keep-Alive
    x-forwarded-for: 10.10.10.3, 10.10.10.4
    x-real-ip: 10.10.10.5
    content-length: 401
    remote-host: 10.10.10.6
    user-agent: java/socket
    content-type: application/json; charset=utf-8
    cookie: JSESSION*****#*#*****3
    ccmessaging-token: ********
    accept: */*
    
    {"roomId":"xx","userId":"xx","userName":"xx","role":"xx"}
  • Response
    {
    	"retCode":"0",
    	"data":{
    		"roomId":"xx",
    		"wssUrl":"xx",
    		"wssUrlOut":"xx",
    		"signature":"xx"
    	}
    }