Get the URL of a chat room

Update time: 2022/12/13 08:33:31

After creating a chat room, you can request the address of the chat room by calling the server API (recommended) or calling the corresponding API of the SDK to establish a persistent connection to the chat room.

Request URL

httpPOST HTTP/1.1

Request parameters

  • For information about how to set the header in a POST request, see API Call methods.

  • The settings of the body in a POST request:

roomid longYes Chat room ID
accidStringYes Account that joins a chat room
clienttype int No 1: weblink (web client); 2: commonlink (Non-web client); 3: wechatlink (WeChat Mini Program). Default value: 1
clientipStringNoClient IP address. If you specify the client IP address, a link of the chat room closest to the region where the IP address is located will be returned.


cURL request

curlcurl -X POST -H "CheckSum: 51eb13ea5ee3a2c00e8388e48e61c65c7866c366" -H "AppKey: f1234540c12345673123456847aaaaaa" -H "Nonce: 1" -H "CurTime: 1451217708" -H "Content-Type: application/x-www-form-urlencoded" -d 'roomid=66&accid=zhangsan&clienttype=1' ''

Example response

Example success response

json"Content-Type": "application/json; charset=utf-8"
  "addr": [
  "code": 200

Status codes

The status code is returned in the response body. For more information, see Status codes.

Was this page helpful?
  • Request URL
  • Request parameters
  • Example
  • cURL request
  • Example response
  • Status codes