# chat

A chat-related API that enables notifications, whispering, and sending reservation messages.
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.

# send notice

(opens new window)

# 1. API information

Request URL Method Response Description
https://vchatcloud.com/openapi/v1/notice/{roomId} POST JSON Request to send notification.

# 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
nickName String User nickname Y Within 50 characters
notice String notification message Y Within 100 characters

# 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/notice/{roomId}"
     -H "API_KEY: {API_KEY}" 
     -H "X-AUTH-TOKEN: {X-AUTH-TOKEN}" 
     -H "Content-Type: application/x-www-form-urlencoded"
     -d "nickName={nickName}&notice={notice}"
1
2
3
4
5

# Response

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

TIP

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

# send custom message

(opens new window)

# 1. API information

Request URL Method Response Description
https://vchatcloud.com/openapi/v1/custom/{roomId} POST JSON Request to send custom message.

# 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
jsonString jsonString JSON message Y
nickName String User nickname Y Within 50 characters
sendDate❔ String null date and time of transferred YYYYMMDDHH24MISS

# 3. Response

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

# sendCustom data

Field Type Description Required
scheduleId String Custom message reservation number

# 4. Example

# Request, immediate transfer

curl -X POST "https://vchatcloud.com/openapi/v1/custom/{roomId}"
     -H "API_KEY: {API_KEY}" 
     -H "X-AUTH-TOKEN: {X-AUTH-TOKEN}" 
     -d "jsonString={jsonString}&nickName={nickName}"
     or
     -d "jsonString={jsonString}&nickName={nickName}&sendDate="
1
2
3
4
5
6

# Response, immediate transfer

{
  "result_cd": 1,
  "result_msg": "",
  "data": {
    "scheduleId": "S00000000000000" // 즉시전송 scheduleId: S00000000000000
  }
}
1
2
3
4
5
6
7

# Request, reservation transfer

curl -X POST "https://vchatcloud.com/openapi/v1/custom/{roomId}"
     -H "API_KEY: {API_KEY}" 
     -H "X-AUTH-TOKEN: {X-AUTH-TOKEN}" 
     -d "jsonString={jsonString}&nickName={nickName}&sendDate={sendDate}"
1
2
3
4

# Response, reservation transfer

{
  "result_cd": 1,
  "result_msg": "",
  "data": {
    "scheduleId": "S00000000000107" // 예약전송 scheduleId: S+숫자 14자리
  }
}
1
2
3
4
5
6
7

TIP

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

# cancel send custom message

(opens new window)

# 1. API information

Request URL Method Response Description
https://vchatcloud.com/openapi/v1/custom/{roomId}/{scheduleId} DEL JSON Request cancellation of sending custom messages.

# 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
scheduleId String Custom message reservation number 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/v1/custom/{roomId}/{scheduleId}"
     -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.

# send whisper message

(opens new window)

# 1. API information

Request URL Method Response Description
https://vchatcloud.com/openapi/v1/whisper/{roomId}/{clientKey} POST JSON Request to send whisper message.

# 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
clientKey String UserKey Y
nickName String User nickname Y Within 50 characters
message String whisper message Y Within 100 characters

# 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/whisper/{roomId}/{clientKey}"
     -H "API_KEY: {API_KEY}" 
     -H "X-AUTH-TOKEN: {X-AUTH-TOKEN}" 
     -H "Content-Type: application/x-www-form-urlencoded"
     -d "nickName={nickName}&message={message}"
1
2
3
4
5

# 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.