# Chat room

A chat room-related API that allows you to create, modify, and destroy chat rooms and querying chat room lists and details. When calling the API, the header must contain the token issued through the token API (opens new window) and the API KEY used to retrieve the token.

TIP

✔️ To check API_KEY, roomId, clientKey and issue X-AUTH-TOKEN, see the Prepare to use API. ✔️ For webrtc options, see Note > webRTC.

# chat room list

(opens new window)

# 1. API information

Request URL Method Response Description
https://vchatcloud.com/openapi/v2/rooms GET JSON Request chat room list information.

# 2. Request

There are no request variables. When calling from the request URL, please communicate the values of the users API_KEY and X-AUTH-TOKEN to the header as follows:

# Headers

Request header Description Required
API_KEY User apikey transfer header Y
X-AUTH-TOKEN authentication token transfer header Y

# 3. Response

Field Type Description Required
result_cd Number Result Code Y
result_msg String Result Message Y
list List Chat Room Information List Y

# listRoom list

Field Type Description Required Note
userId String ID Y
roomId String Chatroom ID (channel key) Y
maxUser String Maximum Users Y
startDt String Start Date and Time Y
endDt String End Date and Time Y
MessageCount String Current Message Count Y
roomName String Chat Room Title Y
joinCount String Cumulative number of users Y
roomStatus String Chat room status Y active: Available
pending: Pause
isPossibleDup String Allow duplicate connections Y true: Duplicate allowed
else: No duplication allowed
roomType String room Type Y 01: Normal
, 02: Video
, 03: metaverse
webrtcStat String webRTC Status Y Y : Available
N : Nonavailable
webrtc String webRTC option N Automatically grant by webrtcStat
resolution String resolution N 243: Low Definition
, 360: normal
, 480: High Definition
, 720: Full High Definition
gTransStat String Google Translation Status Y Y : Available
N : Nonavailable
gApiKey String Google Api Key N
template String Metaverse Template N 01: Room
02: Office 1
03: Office 2
04: Seminar

# 4. Example

# Request

curl -X GET "https://vchatcloud.com/openapi/v2/rooms"
     -H "API_KEY: {API_KEY}"
     -H "X-AUTH-TOKEN: {X-AUTH-TOKEN}"
1
2
3

# Response

{
  "result_cd": 1,
  "result_msg": "",
  "list": [
    {
      "template": "01",
      "gTransStat": "N",
      "messageCount": "0",
      "webrtc": "0",
      "gApiKey": "",
      "joinCount": "12",
      "webrtcStat": "N",
      "endDt": "99991231235959",
      "userId": "{userId}",
      "isPossibleDup": "false",
      "resolution": "0",
      "roomId": "{roomId}",
      "roomName": "일반",
      "roomStatus": "pending",
      "startDt": "20220523144535",
      "roomType": "03",
      "maxUser": "9"
    },
    {
      "template": "null",
      "gTransStat": "N",
      "webrtc": "91",
      "messageCount": "0",
      "gApiKey": "",
      "joinCount": "0",
      "webrtcStat": "Y",
      "endDt": "99991231235959",
      "userId": "{userId}",
      "isPossibleDup": "false",
      "resolution": "0",
      "roomId": "{roomId}",
      "roomName": "제목",
      "roomStatus": "active",
      "startDt": "20220525110140",
      "roomType": "01",
      "maxUser": "100"
    }
  ]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44

TIP

✔️ For result codes, see Code Definition > Result Code.

# chat room details

(opens new window)

# 1. API information

Request URL Method Response Description
https://vchatcloud.com/openapi/v2/rooms/{roomId} GET JSON Request more information about the chat room.

# 2. Request

# Headers

Request header Description Required
API_KEY User apikey transfer header Y
X-AUTH-TOKEN authentication token transfer header Y

# Parameters

Name Type Default Description Required
roomId String Chatroom ID (channel key) Y

# 3. Response

Field Type Description Required
result_cd Number Result Code Y
result_msg String Result Message Y
data Object Chat Room detail Information Y

# getRoomInfo data

Field Type Description Required Note
userId String ID Y
roomId String Chatroom ID (channel key) Y
maxUser String Maximum Users Y
startDt String Start Date and Time Y
endDt String End Date and Time Y
MessageCount String Current Message Count Y
currentUserCount String Current number of users Y
roomName String Chat Room Title Y
joinCount String Cumulative number of users Y
roomStatus String Chat room status Y active: Available
pending: Pause
isPossibleDup String Allow duplicate connections Y true: Duplicate allowed
else: No duplication allowed
roomType String room Type Y 01: Normal
, 02: Video
, 03: metaverse
webrtcStat String webRTC Status Y Y : Available
N : Nonavailable
webrtc String webRTC option N Automatically grant by webrtcStat
resolution String resolution N 243: Low Definition
, 360: normal
, 480: High Definition
, 720: Full High Definition
gTransStat String Google Translation Status Y Y : Available
N : Nonavailable
gApiKey String Google Api Key N
template String Metaverse Template N 01: Room
02: Office 1
03: Office 2
04: Seminar

# 4. Example

# Request

curl -X GET "https://vchatcloud.com/openapi/v2/rooms/{roomId}"
     -H "API_KEY: {API_KEY}"
     -H "X-AUTH-TOKEN: {X-AUTH-TOKEN}"
1
2
3

# Response

{
  "result_cd": 1,
  "result_msg": "",
  "data": {
    "template": "01",
    "gTransStat": "N",
    "messageCount": "0",
    "webrtc": "91",
    "gApiKey": "",
    "joinCount": "13",
    "webrtcStat": "Y",
    "endDt": "99991231235959",
    "userId": "{userId}",
    "isPossibleDup": "false",
    "resolution": "360",
    "roomId": "{roomId}",
    "roomName": "일반",
    "roomStatus": "pending",
    "startDt": "20220523144251",
    "currentUserCount": "0",
    "roomType": "03",
    "maxUser": "8"
  }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

TIP

✔️ For result codes, see Code Definition > Result Code.

# create chat room

(opens new window)

# 1. API information

Request URL Method Response Description
https://vchatcloud.com/openapi/v2/rooms POST JSON Request to create a chat room.

# 2. Request

# Headers

Request header Description Required
API_KEY User apikey transfer header Y
X-AUTH-TOKEN authentication token transfer header Y

# Parameters

Name Type Default Description Required Note
roomName String Chat Room Title Y Within 50 characters
maxUser String Maximum Users Y
gApiKey String Google Api Key N
gTransStat String Google translation Status Y Y : Available
N : Nonavailable
resolution String resolution N 243: Low Definition
, 360: normal
, 480: High Definition
, 720: Full High Definition
roomType String room Type Y 01: Normal
, 02: Video
, 03: metaverse
rtcStat String webRTC Status Y Y : Available
N : Nonavailable
template String Metaverse Template N 01: Room
02: Office 1
03: Office 2
04: Seminar

# 3. Response

Field Type Description Required
result_cd Number Result Code Y
result_msg String Result Message Y
data Object Response data Y

# createRoom data

Field Type Description Required
roomId String Chatroom ID (channel key) Y

# 4. Example

# Request

curl -X POST "https://vchatcloud.com/openapi/v2/rooms"
     -H "API_KEY: {API_KEY}"
     -H "X-AUTH-TOKEN: {X-AUTH-TOKEN}"
     -H "Content-Type: application/x-www-form-urlencoded"
     -d "gApiKey={gApiKey}&gTransStat={Y or N}&maxUser={maxUser}&resolution={Normal or High Definition or Full High Definition}&roomName={roomName}&roomType={Normal or Video or metaverse}&rtcStat={Y or N}&template={01 or 02}"
1
2
3
4
5

# Response

{
  "result_cd": 1,
  "result_msg": "",
  "data": {
    "roomId": "{roomId}"
  }
}
1
2
3
4
5
6
7

TIP

✔️ For result codes, see Code Definition > Result Code.

# modify chat room

(opens new window)

# 1. API information

Request URL Method Response Description
https://vchatcloud.com/openapi/v2/rooms/{roomId} POST JSON Request to modify a chat room.

# 2. Request

# Headers

Request header Description Required
API_KEY User apikey transfer header Y
X-AUTH-TOKEN authentication token transfer header Y

# Parameters

Name Type Default Description Required Note
roomId String Chatroom ID (channel key) Y
roomName String Chat Room Title Y Within 50 characters
roomType String room Type Y 01: Normal
, 02: Video
, 03: metaverse
maxUser String Maximum Users Y
rtcStat String webRTC Status Y Y : Available
N : Nonavailable
resolution String resolution N 243: Low Definition
, 360: normal
, 480: High Definition
, 720: Full High Definition
gTransStat String Google translation Status Y Y : Available
N : Nonavailable
gApiKey String Google Api Key N
template String Metaverse Template N 01: Room
02: Office 1
03: Office 2
04: Seminar

# 3. Response

Field Type Description Required
result_cd Number Result Code Y
result_msg String Result Message Y

# 4. Example

# Request

curl -X POST "https://vchatcloud.com/openapi/v2/rooms/{roomId}"
     -H "API_KEY: {API_KEY}"
     -H "X-AUTH-TOKEN: {X-AUTH-TOKEN}"
     -H "Content-Type: application/x-www-form-urlencoded"
     -d "roomName={roomName}&gApiKey={gApiKey}&roomStatus={A or S or E}&maxUser={maxUser}&rtcStat={Y or N}&gTransStat={Y or N}&roomType={Normal or Video or metaverse}&template=01"
1
2
3
4
5

# Response

{
  "result_cd": 1,
  "result_msg": ""
}
1
2
3
4

TIP

✔️ For result codes, see Code Definition > Result Code.

# destroy chat room

(opens new window)

# 1. API information

Request URL Method Response Description
https://vchatcloud.com/openapi/v2/rooms/{roomId} DELETE JSON Request to destroy a chat room.

# 2. Request

# Headers

Request header Description Required
API_KEY User apikey transfer header Y
X-AUTH-TOKEN authentication token transfer header Y

# Parameters

Name Type Default Description Required
roomId String Chatroom ID (channel key) Y

# 3. Response

Field Type Description Required
result_cd Number Result Code Y
result_msg String Result Message Y

# 4. Example

# Request

curl -X DELETE "https://vchatcloud.com/openapi/v2/rooms/{roomId}"
     -H "API_KEY: {API_KEY}"
     -H "X-AUTH-TOKEN: {X-AUTH-TOKEN}"
1
2
3

# Response

{
  "result_cd": 1,
  "result_msg": ""
}
1
2
3
4

TIP

✔️ For result codes, see Code Definition > Result Code.

Copyright 2022. E7Works Inc. & JOYTUNE Corp. All Rights Reserved.