# user
A user-related API that allows you to query and disable chat room users. 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.
# chat room user list
# 1. API information
Request URL | Method | Response | Description |
---|---|---|---|
https://vchatcloud.com/openapi/v1/users/{roomId} | GET | JSON | Request a list of chat room users and more information. |
# 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 |
list | List | Chat room user list | Y |
# listUser list
Field | Type | Description | Required |
---|---|---|---|
roomId | String | Chatroom ID (channel key) | Y |
clientKey | String | UserKey | Y |
nickName | String | User nickname | Y |
grade | String | User Grade | Y |
# 4. Example
# Request
curl -X GET "https://vchatcloud.com/openapi/v1/users/{roomId}"
-H "API_KEY: {API_KEY}"
-H "X-AUTH-TOKEN: {X-AUTH-TOKEN}"
1
2
3
2
3
# Response
{
"result_cd": 1,
"result_msg": "",
"list": [
{
"clientKey": "{clientKey}",
"nickName": "운영자",
"grade": "userManager",
"roomId": "{roomId}"
},
{
"clientKey": "{clientKey}",
"nickName": "Han",
"grade": "user",
"roomId": "{roomId}"
}
]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
TIP
✔️ For result codes, see Code Definition > Result Code.
# exile user list
# 1. API information
Request URL | Method | Response | Description |
---|---|---|---|
https://vchatcloud.com/openapi/v1/exiles/{roomId} | GET | JSON | Request a list of exiled users and more information. |
# 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 |
list | List | exile user list | Y |
# listExileUser list
Field | Type | Description | Required |
---|---|---|---|
clientKey | String | UserKey | Y |
nickName | String | User nickname | Y |
exileDate | String | Exiled Date | Y |
# 4. Example
# Request
curl -X GET "https://vchatcloud.com/openapi/v1/exiles/{roomId}"
-H "API_KEY: {API_KEY}"
-H "X-AUTH-TOKEN: {X-AUTH-TOKEN}"
1
2
3
2
3
# Response
{
"result_cd": 1,
"result_msg": "",
"list": [
{
"clientKey": "{clientKey}",
"nickName": "Han",
"muteDate": "20211004123017"
},
{
"clientKey": "{clientKey}",
"nickName": "Richard",
"muteDate": "20220218011600"
}
]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
TIP
✔️ For result codes, see Code Definition > Result Code.
# exile the user
# 1. API information
Request URL | Method | Response | Description |
---|---|---|---|
https://vchatcloud.com/openapi/v1/exiles/{roomId}/{clientKey} | POST | JSON | Request user expulsion. |
# 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 | |
clientKey | String | UserKey | Y |
# 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/v1/exiles/{roomId}/{clientKey}"
-H "API_KEY: {API_KEY}"
-H "X-AUTH-TOKEN: {X-AUTH-TOKEN}"
1
2
3
2
3
# Response
{
"result_cd": 1,
"result_msg": ""
}
1
2
3
4
2
3
4
TIP
✔️ For result codes, see Code Definition > Result Code.
# cancel exile the user
# 1. API information
Request URL | Method | Response | Description |
---|---|---|---|
https://vchatcloud.com/openapi/v1/exiles/{roomId}/{clientKey} | PUT | JSON | Request cancellation of user expulsion. |
# 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 | |
clientKey | String | UserKey | Y |
# 3. Response
Field | Type | Description | Required |
---|---|---|---|
result_cd | Number | Result Code | Y |
result_msg | String | Result Message | Y |
# 4. Example
# Request
curl -X PUT "https://vchatcloud.com/openapi/v1/exiles/{roomId}/{clientKey}"
-H "API_KEY: {API_KEY}"
-H "X-AUTH-TOKEN: {X-AUTH-TOKEN}"
1
2
3
2
3
# Response
{
"result_cd": 1,
"result_msg": ""
}
1
2
3
4
2
3
4
TIP
✔️ For result codes, see Code Definition > Result Code.
# write-restricted user list
# 1. API information
Request URL | Method | Response | Description |
---|---|---|---|
https://vchatcloud.com/openapi/v1/mute/{roomId} | GET | JSON | Request a list of write-restricted users and more information. |
# 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 |
---|---|---|---|
list | List | write-restricted user list | Y |
# listMuteUser list
Field | Type | Description | Required |
---|---|---|---|
clientKey | String | UserKey | Y |
nickName | String | User nickname | Y |
muteDate | String | Mute date | Y |
# 4. Example
# Request
curl -X GET "https://vchatcloud.com/openapi/v1/mute/{roomId}"
-H "API_KEY: {API_KEY}"
-H "X-AUTH-TOKEN: {X-AUTH-TOKEN}"
1
2
3
2
3
# Response
{
"result_cd": 1,
"result_msg": "",
"list": [
{
"clientKey": "{clientKey}",
"nickName": "Richard",
"muteDate": "20210610140000"
}
]
}
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
TIP
✔️ For result codes, see Code Definition > Result Code.
# user write restriction
# 1. API information
Request URL | Method | Response | Description |
---|---|---|---|
https://vchatcloud.com/openapi/v1/mute/{roomId}/{clientKey} | POST | JSON | Request user write restrictions. |
# 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 | |
clientKey | String | UserKey | Y |
# 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/v1/mute/{roomId}/{clientKey}"
-H "API_KEY: {API_KEY}"
-H "X-AUTH-TOKEN: {X-AUTH-TOKEN}"
1
2
3
2
3
# Response
{
"result_cd": 1,
"result_msg": ""
}
1
2
3
4
2
3
4
TIP
✔️ For result codes, see Code Definition > Result Code.
# cancel user write restrictions
# 1. API information
Request URL | Method | Response | Description |
---|---|---|---|
https://vchatcloud.com/openapi/v1/mute/{roomId}/{clientKey} | PUT | JSON | Request cancellation of user write restrictions. |
# 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 | |
clientKey | String | UserKey | Y |
# 3. Response
Field | Type | Description | Required |
---|---|---|---|
result_cd | Number | Result Code | Y |
result_msg | String | Result Message | Y |
# 4. Example
# Request
curl -X PUT "https://vchatcloud.com/openapi/v1/mute/{roomId}/{clientKey}"
-H "API_KEY: {API_KEY}"
-H "X-AUTH-TOKEN: {X-AUTH-TOKEN}"
1
2
3
2
3
# Response
{
"result_cd": 1,
"result_msg": ""
}
1
2
3
4
2
3
4
TIP
✔️ For result codes, see Code Definition > Result Code.