Skip to content

Basic information

This section explains the basic information you need to know before using the Chat API.

Prerequisites

To use the Chat API, you need the following items:

  • Hive certification key: An authentication token for API calls
    • Can be found at Hive Console > App Center > Project management > Game details > Basic information
  • Game index: The index of the game created in Hive Console > App Center > Project management
Warning
  • The Hive certification key is sensitive security information and must never be exposed externally. For security, avoid including it directly in your source code. If you need to implement features in the client environment, please use the Hive SDK.
  • All Chat APIs operate in a server-to-server communication manner. If you call the API directly from the game client, there is a risk of authentication token leakage and unexpected issues, so please use with caution.

Common headers

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

Response codes

  • Common codes
HTTP status code Code Message Description
200 0 Success. Success
400 100 Bad request. Invalid request
401 101 Invalid token. Invalid token
403 102 Forbidden. No permission
404 103 Not found. Not found
405 104 Method not allowed. Method not allowed
500 105 Internal server error. Internal server error
503 108 Server is busy. please request later. Server overload
  • Error codes
HTTP status code Code Message Description
400 200 Duplicate channel ID. Duplicate channel ID
400 201 Channel not found or deleted. Channel not found or deleted
400 202 Channel is full. Cannot enter channel due to exceeding participant limit
400 203 Invalid channel password. Invalid channel password
400 204 Message size exceeded. The maximum size is 200. Message size exceeded (max 200 characters)
400 300 User not in session. User not in session (not connected to socket server)
400 301 User not in the channel. User not in the channel
400 302 User is already in the channel. User is already in the channel
400 303 User already blocked. User is already blocked
400 304 Block list is full. The maximum size is 100. Block list is full (max 100 users)
400 305 User not in block list. User not in block list
400 306 User is blocked. User is blocked
400 307 The maximum number of channels the user can enter has been exceeded. Exceeded the number of channels the user can enter
403 308 User is not the owner of the channel. User is not the channel owner
400 400 Custom message size exceeded. The maximum size is 8,000 Byte. Custom message size exceeded (max 8,000 bytes)