Skip to content

Channel

This guide explains how to use the APIs for creating and deleting channels, updating channel information, and retrieving channel lists and participants.

Overview

A channel is a conceptual space where chat takes place, and all in-game chat occurs within channels.

This section describes the channel types and channel operation methods supported by the API.

Channel types

The following channel types can be created via API requests.

Channel type Members Participation limit Leave on disconnect Main use case
PUBLIC 1 ~ 5000 Up to 10 O Open chat, events
GROUP 1 ~ 500 Up to 10 X Guild, team, party
PRIVATE 1 ~ 500 Up to 10 X Friends, private group
ONE_ON_ONE 2 Up to 200 X 1:1 chat
  • PUBLIC channels are suitable for open chat with unspecified participants.
  • Only users connected to the socket server can join the channel.
  • GROUP and PRIVATE channels are suitable for group chats such as guilds, friends, or parties.
  • PRIVATE channels require a password to join.

Channel operation

The basic operation of channels is as follows:

  • There are clear entry and exit points for channels, and the chat server provides consistent handling at each point.
  • When a message is sent to a channel, it is delivered to all users in the channel (except blocked users).
  • Only channel participants can send messages to the channel (notice messages are an exception).


The following describes the behavior when using the channel API.

Channel creation and deletion

  • You can create a channel using the create channel or create 1:1 channel API.
  • A channel is deleted in the following cases:
    • When the delete channel API is used
    • When the channel owner is not SYSTEM and there are no participants, the channel is periodically deleted.
  • If a channel is deleted while there are participants, a channel deletion event is sent to the participants.

Channel information update

  • You can update channel information using the update channel API.
    • Updatable items: channel name, maximum number of members, password, chat history availability
    • If you reduce the maximum number of members below the current number of participants, existing participants are not forcibly removed.
    • 1:1 channel (ONE_ON_ONE) information cannot be updated.

Create channel API

Creates a new channel.

If the request body parameter playerId is included, the user with that playerId becomes the channel owner and is automatically joined to the channel. If playerId is not included, the channel owner is set to SYSTEM.

The following types of channels are periodically deleted:

  • Channels where the owner is not SYSTEM and there are no participants

Request URL

Server URL
LIVE https://api-chat.withhive.com/api/v1/games/{gameIndex}/channel
SANDBOX https://sandbox-api-chat.withhive.com/api/v1/games/{gameIndex}/channel
HTTP METHOD POST
CONTENT-TYPE application/json

Path parameters

Field name Description Type Required
gameIndex Hive game index integer Y

Header parameters

Field name Description Type Required
Authorization Authentication token for API calls (Bearer) string Y
Content-Type Type of the request data (application/json) string Y

Request body

Field name Description Type Required
channelId Channel ID
(English letters, numbers, some special characters(-, ., _, ~, :) are allowed, up to 100 characters)
string Y
playerId Player ID of the channel creator long N
password Password (required for PRIVATE channels)
(up to 50 characters)
string N
channelName Channel name
(up to 50 characters)
string Y
maxMemberCount Maximum number of channel participants
(from 2 to 5,000)
integer Y
type Channel type (PRIVATE, PUBLIC, GROUP) string Y
chatHistoryAllowed Message history viewable
(default: false)
boolean N

Response body

Field name Description Type
code Response result code integer
message Result message string
data Response data object

Response body > data

Field name Description Type
channelId Channel ID string
type Channel type (PRIVATE, PUBLIC, GROUP) string
gameIndex Hive game index integer
owner Channel owner string
channelName Channel name string
maxMemberCount Maximum number of channel participants integer
chatHistoryAllowed Message history viewable boolean
regTime Channel creation date and time (UTC+0 standard, yyyy-MM-dd'T'HH:mm:ss.SSSZ format) string
regTimeMillis Channel creation date and time (UnixTimestamp Millisecond) long

Request sample

curl --request POST 'https://api-chat.withhive.com/api/v1/games/1/channel' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJIaXZlIiwiaWF0IjoxNzAyNDU4MTkzLCJqdGkiOiIxMzY2NDk4MjcxIn0.VSwvsTE-tS0sL_e9p9gNvHRkMCbsycSO4ObE4J2ysjs' \
--header 'Content-Type: application/json' \
--data'{
    "channelId": "open:12345",
    "channelName": "Open Chat Room",
    "maxMemberCount": 100,
    "type": "PUBLIC",
    "chatHistoryAllowed": true
}'

Response sample

{
    "code": 0,
    "message": "Success.",
    "data": {
        "channelId": "open:12345",
        "type": "PUBLIC",
        "gameIndex": 1,
        "owner": "SYSTEM",
        "channelName": "Open Chat Room",
        "chatHistoryAllowed": true,
        "maxMemberCount": 100,
        "regTime": "2025-07-21T08:39:07.542913300Z",
        "regTimeMillis": 1753087147542
  }
}

Create 1:1 channel API

Creates a 1:1 channel and joins the users corresponding to playerId and otherPlayerId in the request data to the 1:1 channel (ONE_ON_ONE). If a 1:1 channel (ONE_ON_ONE) already exists, it joins the existing channel.

Each user can have up to 200 1:1 channels (ONE_ON_ONE).

Request URL

Server URL
LIVE https://api-chat.withhive.com/api/v1/games/{gameIndex}/channels/1on1
SANDBOX https://sandbox-api-chat.withhive.com/api/v1/games/{gameIndex}/channels/1on1
HTTP METHOD POST
CONTENT-TYPE application/json

Path parameters

Field name Description Type Required
gameIndex Hive game index integer Y

Header parameters

Field name Description Type Required
Authorization Authentication token for API calls (Bearer) string Y
Content-Type Type of the request data (application/json) string Y

Request body

Field name Description Type Required
playerId Player ID long Y
otherPlayerId Opponent Player ID long Y
chatHistoryAllowed Message history viewable (default: false) boolean N

Response body

Field name Description Type
code Response result code integer
message Result message string
data Response data object

Response body > data

Field name Description Type
channelId Channel ID string
type Channel type (ONE_ON_ONE) string
gameIndex Hive game index integer
owner Channel owner string
channelName Channel name string
maxMemberCount Maximum number of channel participants integer
chatHistoryAllowed Message history viewable boolean
regTime Channel creation date and time (UTC+0 standard, yyyy-MM-dd'T'HH:mm:ss.SSSZ format) string
regTimeMillis Channel creation date and time (UnixTimestamp Millisecond) long

Request sample

curl --request POST 'https://api-chat.withhive.com/api/v1/games/1/channel/1on1' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJIaXZlIiwiaWF0IjoxNzAyNDU4MTkzLCJqdGkiOiIxMzY2NDk4MjcxIn0.VSwvsTE-tS0sL_e9p9gNvHRkMCbsycSO4ObE4J2ysjs' \
--header 'Content-Type: application/json' \
--data'{
    "playerId": 1000,
    "otherPlayerId": 2000,
    "chatHistoryAllowed": false
}'

Response sample

{
    "code": 0,
    "message": "Success.",
    "data": {
        "channelId": "V0FQBKSa9bWC33v",
        "type": "ONE_ON_ONE",
        "gameIndex": 1,
        "owner": "100",
        "channelName": "100&200",
        "chatHistoryAllowed": true,
        "maxMemberCount": 2,
        "regTime": "2025-07-18T09:37:36.697035738Z",
        "regTimeMillis": 1752831456697
    }
}

Update channel API

Updates an existing channel.

Only channels of the following types can be updated:

  • PUBLIC
  • PRIVATE
  • GROUP

When updating the maximum number of participants in a chat channel, even if more users are currently in the channel than the new limit, the existing users are not forcibly removed. Therefore, if you reduce the maximum number of participants to below the current number, there will be a temporary state where the number of participants exceeds the maximum limit.

Request URL

Server URL
LIVE https://api-chat.withhive.com/api/v1/games/{gameIndex}/channels/{channelId}
SANDBOX https://sandbox-api-chat.withhive.com/api/v1/games/{gameIndex}/channels/{channelId}
HTTP METHOD PATCH
CONTENT-TYPE application/json

Path parameters

Field name Description Type Required
gameIndex Hive game index integer Y
channelId Channel ID string Y

Header parameters

Field name Description Type Required
Authorization Authentication token for API calls (Bearer) string Y
Content-Type Type of the request data (application/json) string Y

Request body

Field name Description Type Required
channelName Channel name
(up to 50 characters)
string N
password Password (required for PRIVATE channels)
(up to 50 characters)
string N
maxMemberCount Maximum number of channel participants integer N
type Channel type (PRIVATE, PUBLIC, GROUP) string N
chatHistoryAllowed Message history viewable
(default: false)
boolean N

Response body

Field name Description Type
code Response result code integer
message Result message string
data Response data object

Request sample

curl --request PATCH 'https://api-chat.withhive.com/api/v1/games/1/channels/testchannel' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJIaXZlIiwiaWF0IjoxNzAyNDU4MTkzLCJqdGkiOiIxMzY2NDk4MjcxIn0.VSwvsTE-tS0sL_e9p9gNvHRkMCbsycSO4ObE4J2ysjs' \
--header 'Content-Type: application/json' \
--data'{
    "channelName": "Open Chat Room",
    "maxMemberCount": 100,
    "type": "PUBLIC",
    "chatHistoryAllowed": true
}'

Response sample

{
    "code": 0,
    "message": "Success."
}

Delete channel API

Deletes a channel and sends a channel deletion event to the users participating in the channel.

Request URL

Server URL
LIVE https://api-chat.withhive.com/api/v1/games/{gameIndex}/channels/{channelId}
SANDBOX https://sandbox-api-chat.withhive.com/api/v1/games/{gameIndex}/channels/{channelId}
HTTP Method DELETE

Path parameters

Field name Description Type Required
gameIndex Hive game index integer Y
channelId Channel ID string Y

Header parameters

Field name Description Type Required
Authorization Authentication token for API calls (Bearer) string Y

Response body

Field name Description Type
code Response result code integer
message Result message string

Request sample

curl --request DELETE 'https://api-chat.withhive.com/api/v1/games/1/channels/open:12345' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJIaXZlIiwiaWF0IjoxNzAyNDU4MTkzLCJqdGkiOiIxMzY2NDk4MjcxIn0.VSwvsTE-tS0sL_e9p9gNvHRkMCbsycSO4ObE4J2ysjs'

Response sample

{
    "code": 0,
    "message": "Success."
}

Get channels API

Retrieves the list of channels created. The channel types that can be retrieved are as follows:

  • PUBLIC
  • PRIVATE
  • GROUP

Request URL

Server URL
LIVE https://api-chat.withhive.com/api/v1/games/{gameIndex}/channels
SANDBOX https://sandbox-api-chat.withhive.com/api/v1/games/{gameIndex}/channels
HTTP METHOD GET

Path parameters

Field name Description Type Required
gameIndex Hive game index integer Y

Header parameters

Field name Description Type Required
Authorization Authentication token for API calls (Bearer) string Y

Query parameters

Field name Description Type Required
type Channel type (PRIVATE, PUBLIC, GROUP) string N
channelId Retrieves channels starting with the channel ID string N
channelName Retrieves channels containing the channel name string N
sort Sort criteria (channelId, channelName, regTime)
(default: regTime)
string N
order Sort order (ASC, DESC)
(default: DESC)
string N
size Number of channels to retrieve per page
(min 1 - max 10, default: 10)
integer N
page Page number to retrieve
(starts from 1, default: 1)
integer N

Response body

Field name Description Type
code Response result code integer
message Result message string
data Response data object

Response body > data

Field name Description Type
content List of channels object array
page Page information object

Response body > data > content

Field name Description Type
channelId Channel ID string
type Channel type (PRIVATE, PUBLIC, GROUP) string
gameIndex Hive game index integer
owner Player ID of the channel owner string
channelName Channel name string
memberCount Current number of participants in the channel integer
maxMemberCount Maximum number of channel participants integer
chatHistoryAllowed Message history viewable boolean
regTime Channel creation date and time (UTC+0 standard, yyyy-MM-dd'T'HH:mm:ss.SSSZ format) string
regTimeMillis Channel creation date and time (UnixTimestamp Millisecond) long

Response body > data > page

Field name Description Type
size Number of items per page integer
currentPage Current page number integer
totalElements Total number of items integer
totalPages Total number of pages integer

Request sample

curl --request GET 'https://api-chat.withhive.com/api/v1/games/1/channels?type=PUBLIC&sort=regTime&order=DESC&size=10&page=1' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJIaXZlIiwiaWF0IjoxNzAyNDU4MTkzLCJqdGkiOiIxMzY2NDk4MjcxIn0.VSwvsTE-tS0sL_e9p9gNvHRkMCbsycSO4ObE4J2ysjs'

Response sample

{
  "code": 0,
  "message": "Success.",
  "data": {
    "content": [
      {
        "channelId": "open:12345",
        "type": "PUBLIC",
        "gameIndex": 1,
        "owner": "1000",
        "channelName": "Open Chat Room",
        "memberCount": 2,
        "maxMemberCount": 50,
        "chatHistoryAllowed": true,
        "regTime": "2024-12-30T15:01:01.004Z",
        "regTimeMillis": 1731306364351
      },
      /// ... Channel information
    ],
    "page": {
      "size": 10,
      "currentPage": 1,
      "totalElements": 100,
      "totalPages": 10
    }
  }
}

Get channel API

Retrieves detailed information about a specific channel.

Request URL

Server URL
LIVE https://api-chat.withhive.com/api/v1/games/{gameIndex}/channels/{channelId}
SANDBOX https://sandbox-api-chat.withhive.com/api/v1/games/{gameIndex}/channels/{channelId}
HTTP METHOD GET

Path parameters

Field name Description Type Required
gameIndex Hive game index integer Y
channelId Channel ID string Y

Header parameters

Field name Description Type Required
Authorization Authentication token for API calls (Bearer) string Y

Response body

Field name Description Type
code Response result code integer
message Result message string
data Response data object

Response body > data

Field name Description Type
info Channel information object
members List of participants object array

Response body > data > info

Field name Description Type
channelId Channel ID string
type Channel type (PRIVATE, PUBLIC, GROUP, ONE_ON_ONE) string
gameIndex Hive game index integer
owner Channel owner string
channelName Channel name string
memberCount Current number of participants in the channel integer
maxMemberCount Maximum number of channel participants integer
chatHistoryAllowed Message history viewable boolean
regTime Channel creation date and time (UTC+0 standard, yyyy-MM-dd'T'HH:mm:ss.SSSZ format) string
regTimeMillis Channel creation date and time (UnixTimestamp Millisecond) long

Response body > data > members

Field name Description Type
playerId Player ID long

Request sample

curl --request GET 'https://api-chat.withhive.com/api/v1/games/1/channels/open:12345' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJIaXZlIiwiaWF0IjoxNzAyNDU4MTkzLCJqdGkiOiIxMzY2NDk4MjcxIn0.VSwvsTE-tS0sL_e9p9gNvHRkMCbsycSO4ObE4J2ysjs'

Response sample

{
  "code": 0,
  "message": "Success.",
  "data": {
    "info": {
      "channelId": "open:12345",
      "type": "PUBLIC",
      "gameIndex": 1,
      "owner": "SYSTEM",
      "channelName": "Open Chat Room",
      "memberCount": 2,
      "maxMemberCount": 50,
      "chatHistoryAllowed": true,
      "regTime": "2024-12-30T15:01:01.004Z",
      "regTimeMillis": 1731306364351
    },
    "members": [
      {
        "playerId": 1
      },
      {
        "playerId": 2
      }
    ]
  }
}

Get channel members API

Retrieves information about the users participating in a channel.

Request URL

Server URL
LIVE https://api-chat.withhive.com/api/v1/games/{gameIndex}/channels/{channelId}/members
SANDBOX https://sandbox-api-chat.withhive.com/api/v1/games/{gameIndex}/channels/{channelId}/members
HTTP METHOD GET

Path parameters

Field name Description Type Required
gameIndex Hive game index integer Y
channelId Channel ID string Y

Header parameters

Field name Description Type Required
Authorization Authentication token for API calls (Bearer) string Y

Response body

Field name Description Type
code Response result code integer
message Result message string
data Response data object

Response body > data

Field name Description Type
members List of channel participants object array

Response Body > data > members

Field name Description Type
playerId Player ID long

Request sample

curl --request GET 'https://api-chat.withhive.com/api/v1/games/1/channels/open:12345/members' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJIaXZlIiwiaWF0IjoxNzAyNDU4MTkzLCJqdGkiOiIxMzY2NDk4MjcxIn0.VSwvsTE-tS0sL_e9p9gNvHRkMCbsycSO4ObE4J2ysjs'

Response sample

{
  "code": 0,
  "message": "Success.",
  "data": {
    "members": [
      {
        "playerId": 1
      },
      {
        "playerId": 2
      }
    ]
  }
}

Enter channel API

Allows a specific user to join a channel.

Request URL

Server URL
LIVE https://api-chat.withhive.com/api/v1/games/{gameIndex}/channels/{channelId}/enter
SANDBOX https://sandbox-api-chat.withhive.com/api/v1/games/{gameIndex}/channels/{channelId}/enter
HTTP METHOD POST
CONTENT-TYPE application/json

Path parameters

Field name Description Type Required
gameIndex Hive game index integer Y
channelId Channel ID string Y

Header parameters

Field name Description Type Required
Authorization Authentication token for API calls (Bearer) string Y
Content-Type Type of the request data (application/json) string Y

Request body

Field name Description Type Required
playerId Player ID of the user to be joined long Y
password Password (required for PRIVATE channels) string N

Response body

Field name Description Type
code Response result code integer
message Result message string

Request sample

curl --request POST 'https://api-chat.withhive.com/api/v1/games/1/channels/guild:12345/enter' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJIaXZlIiwiaWF0IjoxNzAyNDU4MTkzLCJqdGkiOiIxMzY2NDk4MjcxIn0.VSwvsTE-tS0sL_e9p9gNvHRkMCbsycSO4ObE4J2ysjs' \
--header 'Content-Type: application/json' \
--data '{
    "playerId": 1001,
    "password": "guildPass123"
}'

Response sample

{
    "code": 0,
    "message": "Success."
}

Exit channel API

Allows a user to exit a channel.

The channel is not deleted if the owner exits, unless the owner is not SYSTEM and there are no participants.

Request URL

Server URL
LIVE https://api-chat.withhive.com/api/v1/games/{gameIndex}/channels/{channelId}/exit
SANDBOX https://sandbox-api-chat.withhive.com/api/v1/games/{gameIndex}/channels/{channelId}/exit
HTTP METHOD POST
CONTENT-TYPE application/json

Path parameters

Field name Description Type Required
gameIndex Hive game index integer Y
channelId Channel ID string Y

Header parameters

Field name Description Type Required
Authorization Authentication token for API calls (Bearer) string Y
Content-Type Type of the request data (application/json) string Y

Request body

Field name Description Type Required
playerId Player ID of the user to be exited long Y

Response body

Field name Description Type
code Response result code integer
message Result message string

Request sample

curl --request POST 'https://sandbox-api-chat.withhive.com/api/v1/games/1/channels/guild:12345/exit' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJIaXZlIiwiaWF0IjoxNzAyNDU4MTkzLCJqdGkiOiIxMzY2NDk4MjcxIn0.VSwvsTE-tS0sL_e9p9gNvHRkMCbsycSO4ObE4J2ysjs' \
--header 'Content-Type: application/json' \
--data '{
    "playerId": 1001
}'

Response sample

{
    "code": 0,
    "message": "Success."
}