Skip to content

Http api

Overview

The HTTP API provides chat services by communicating with the API server via HTTP. It is mainly composed of Channel API and User API.

The main features of each channel API and user API are as follows.

  • Channel API
    • Get all channel list API
    • Channel retrieval API
    • Channel participant retrieval API
    • Channel creation API
    • Channel deletion API
    • Channel entry API
    • Channel exit API
    • Announcement message sending API
  • User API
    • User token issuance API
    • User participating channel retrieval API
    • User block list retrieval API
    • User block API
    • User unblock API

Basic information

This provides the basic information that you need to know when using the HTTP API.

Preparation

You need to prepare the following items to use the HTTP API.

  • Hive Certification Key (Hive 인증키): Authentication token for API calls
    • Can be checked in 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

Channel type

The channel types used when sending HTTP API are as follows.

Type Description
PUBLIC A channel that anyone can enter
PRIVATE A channel that can be entered by entering a password
GROUP A channel that only specific users can participate in (ex. guild channel)

Request URL

Server URL
LIVE api-chat.withhive.com
SANDBOX sandbox-api-chat.withhive.com

Common header

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

Response code

  • API response code
HTTP Status Code Code Message Description
200 0 Success. Success
400 100 Bad request. Bad request
401 101 Invalid token. Invalid token
403 102 Forbidden. Forbidden
404 103 Not found. Not found
405 104 Method not allowed. Method not allowed
500 105 Internal server error. Internal server error
  • Detailed error codes (400, 403)
HTTP Status Code Code Message Description
400 200 Duplicate channel ID. Duplicate channel ID
201 Channel not found or deleted. Channel not found or deleted
202 Channel is full. Channel is full
203 Invalid channel password. Invalid channel password
204 Message size exceeded. The maximum size is 200. Message size exceeded (maximum 200 characters)
300 User not in session. User not in session (not connected to the Socket server)
301 User not in the channel. User not in the channel
302 User is already in the channel. User is already in the channel
303 User already blocked. User already blocked
304 Block list is full. The maximum size is 100. Block list is full (maximum 100 users)
305 User not in block list. User not in block list
306 User is blocked. User is blocked
307 The maximum number of channels a user can enter is 10. User has exceeded the maximum number of channels (limit of 10)
403 308 User is not the owner of the channel. User is not the owner of the channel

Channel API features

This explains the API requests and responses for each function of the channel API used in the chat service, along with example code.

Retrieve all channel list

Retrieving the list of currently created channels.

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 Retrieve channels starting with a specific channel ID string N
channelName Retrieve channels containing a specific channel name string N
sort Sorting criteria (channelId, channelName, regTime)
(default regTime)
string N
order Sorting method (ASC, DESC)
(default DESC)
string N
size Number of channels to retrieve per page
(minimum 10 ~ maximum 100, default 10)
integer N
page Page number to retrieve
(starts from 1, default 1)
integer N

Response body

Field Name Description Type
code Response Code integer
message Result Message string
data Response Data object
Response body > data
Field Name Description Type
content Channel List array
page Page Info 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 Channel owner's Hive player ID string
channelName Channel name string
maxMemberCount Maximum number of channel participants integer
regTime Channel creation date and time (based on UTC+0, format yyyy-MM-dd'T'HH:mm:ss.SSSZ) string
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",
        "maxMemberCount": 50,
        "regTime": "2024-12-30T15:01:01.004Z"
      },
      /// ... Channel information
    ],
    "page": {
      "size": 10,
      "currentPage": 1,
      "totalElements": 100,
      "totalPages": 10
    }
  }
}

Channel retrieval

Retrieving detailed information for 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 to query 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 code integer
message Result message string
data Response data object
Response body > data
Field Name Description Type
info Channel Info object
members Participant List array
Response body > data > info
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
regTime Channel creation date and time (based on UTC+0, format yyyy-MM-dd'T'HH:mm:ss.SSSZ) string
Response body > data > members
Field Name Description Type
playerId Hive player ID long
extraData Additional data (UTF-8 based)
(maximum 256 Byte)
string
connectedTime Connection time (UTC+0 based, format yyyy-MM-dd'T'HH:mm:ss.SSSZ) string

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",
        "maxMemberCount": 50,
        "regTime": "2024-12-30T15:01:01.004Z"
    },
    "members": [
      {
        "playerId": 1,
        "extraData": null,
        "connectedTime": "2024-11-25T06:22:06.604Z"
      },
      {
        "playerId": 2,
        "extraData": null,
        "connectedTime": "2024-11-25T06:22:16.233Z"
      }
    ]
  }
}

Channel participants query

Retrieving participant information for a specific 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 to query 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 code integer
message Result message string
data Response data object
Response body > data
Field Name Description Type
members List of channel participants array
Response body > data > members
Field Name Description Type
playerId Hive Player ID long
extraData Additional data (UTF-8 based)
(Maximum 256 Byte)
string
connectedTime Connection time (UTC+0 based, format yyyy-MM-dd'T'HH:mm:ss.SSSZ) string

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,
        "extraData": null,
        "connectedTime": "2024-11-25T06:22:06.604Z"
      },
      {
        "playerId": 2,
        "extraData": null,
        "connectedTime": "2024-11-25T06:22:16.233Z"
      }
    ]
  }
}

Create channel

Creating a new conversation channel.

If the playerId exists, the user will be allowed to enter the channel. If the playerId does not exist, the owner will be SYSTEM.

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

This is the transmission data required when requesting to create a channel.

Field Name Description Type Required
channelId Channel ID
(English letters, numbers, and some special characters (-, ., _, ~, :) allowed, up to 100 characters)
string Y
playerId Hive 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
(minimum 2 to maximum 5,000)
integer Y
type Channel type (PRIVATE, PUBLIC, GROUP) string 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/channel' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJIaXZlIiwiaWF0IjoxNzAyNDU4MTkzLCJqdGkiOiIxMzY2NDk4MjcxIn0.VSwvsTE-tS0sL_e9p9gNvHRkMCbsycSO4ObE4J2ysjs' \
--header 'Content-Type: application/json' \
--data'{
    "channelId": "open:12345",
    "playerId": 1000,
    "channelName": "Open chat room",
    "maxMemberCount": 100,
    "type": "PUBLIC"
}'

Response sample

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

Delete channel

Deleting 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 DELETE

Path parameters

Field Name Description Type Required
gameIndex Hive game index integer Y
channelId Channel ID to delete 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."
}

Enter channel

Entering users into the existing channel.

The maximum number of channels that a user can enter is 10.

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 request data (application/json) string Y

Request body

This is the transmission data required when requesting to enter the channel.

Field Name Description Type Required
playerId Hive player ID of the user to be admitted 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-raw '{
    "playerId": 1001,
    "password": "guildPass123"
}'

Response sample

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

Channel exit

Removing a user from the channel. If the channel owner leaves, the channel will be deleted.

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

This is the transmission data required when requesting to leave the channel.

Field Name Description Type Required
playerId Hive player ID of the user to be removed 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."
}

Notice message sending

Sends announcement messages to a specific channel or all channels in the game. If the channelId parameter is not provided, the announcement message will be sent to all channels created for the corresponding gameIndex.

Request URL

Server URL
LIVE https://api-chat.withhive.com/api/v1/games/{gameIndex}/notice
SANDBOX https://sandbox-api-chat.withhive.com/api/v1/games/{gameIndex}/notice
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

This is the transmission data required when requesting to send a notification message.

Field Name Description Type Required
channelId The channel ID to send the message (channelId sends to all channels if not provided) string N
message The content of the notification message to be sent string Y

Response body

Field Name Description Type
code Response result code integer
message Description result message string

Request sample

curl --request POST 'https://sandbox-api-chat.withhive.com/api/v1/games/1/notice' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJnYW1lSW5kZXgiOjEsInBsYXllcklkIjoxLCJpYXQiOjE3MzI1MTcyMzUsImV4cCI6MTczMjUyMDgzNX0.lm5eFqEuSPjsKZUItpTQvFy_2oWrMMJ_J0MPH9VFtNg' \
--header 'Content-Type: application/json' \
--data '{
    "channelId": "open:12345",
    "message": "Server maintenance is in progress. Please try connecting again later."
}'

Response sample

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

User API features

This explains the API requests and responses for each feature of the user API used in the chat service, along with example code.

User token issuance

Issuing an authentication token for connecting to the socket server.

Connect to the Socket server address returned through the issued token.

Request URL

Server URL
LIVE https://api-chat.withhive.com/api/v1/games/{gameIndex}/users/{playerId}/token
SANDBOX https://sandbox-api-chat.withhive.com/api/v1/games/{gameIndex}/users/{playerId}/token
HTTP METHOD POST

Path parameters

Field Name Description Type Required
gameIndex Hive Game Index integer Y
playerId Hive Player ID long 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 Code integer
message Result Message string
data Response Data object
Response body > data
Field Name Description Type
gameIndex Hive Game Index integer
socketAddress Socket Server Address string
token Issued Token string

Request sample

curl  --request POST 'https://api-chat.withhive.com/api/v1/games/1/users/1001/token' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJnYW1lSW5kZXgiOjEsInBsYXllcklkIjoxLCJpYXQiOjE3MzI1MTcyMzUsImV4cCI6MTczMjUyMDgzNX0.lm5eFqEuSPjsKZUItpTQvFy_2oWrMMJ_J0MPH9VFtNg' 

Response sample

{
  "code": 0,
  "message": "Success.",
  "data": {
    "gameIndex": 1,
    "socketAddress": "wss://test-socket-chat.withhive.com/ws",
    "token": "eyJhbGciOiJIUzI1NiJ9.eyJnYW1lSW5kZXgiOjEsInBsYXllcklkIjoxLCJpYXQiOjE3MzI1MTcyMzUsImV4cCI6MTczMjUyMDgzNX0.lm5eFqEuSPjsKZUItpTQvFy_2oWrMMJ_J0MPH9VFtNg"
  }
}

User participation channel inquiry

Retrieving the list of channels the user is participating in.

Request URL

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

Path parameters

Field Name Description Type Required
gameIndex Hive Game Index integer Y
playerId Hive Player ID long 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 code integer
message Result message string
data Response data object
Response body > data
Field Name Description Type
gameIndex Hive Game Index integer
playerId Hive Player ID long
channels List of Channels array
Response body > data > channels
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 channel participant count integer
regTime Channel creation date and time (based on UTC+0, format yyyy-MM-dd'T'HH:mm:ss.SSSZ) string

Request sample

curl --request GET 'https://sandbox-api-chat.withhive.com/api/v1/games/1/users/1001/channels' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJnYW1lSW5kZXgiOjEsInBsYXllcklkIjoxLCJpYXQiOjE3MzI1MTcyMzUsImV4cCI6MTczMjUyMDgzNX0.lm5eFqEuSPjsKZUItpTQvFy_2oWrMMJ_J0MPH9VFtNg' 

Response sample

{
  "code": 0,
  "message": "Success.",
  "data": {
    "gameIndex": 1,
    "playerId": 1001,
    "channels": [
      {
        "channelId": "guild:12345",
        "type": "GROUP",
        "gameIndex": 1,
        "owner": "1000",
        "channelName": "Guild chat room",
        "maxMemberCount": 50,
        "regTime": "2023-12-19T15:01:01.004Z"
      },
      {
        "channelId": "open:67890",
        "type": "PUBLIC",
        "gameIndex": 1,
        "owner": "SYSTEM",
        "channelName": "Open chat room",
        "maxMemberCount": 100,
        "regTime": "2023-12-20T10:15:30.123Z"
      }
      // ... channel
    ]
  }
}

User block list inquiry

Retrieving the list of users blocked by the user.

Request URL

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

Path parameters

Field Name Description Type Required
gameIndex Hive Game Index string Y
playerId Hive Player ID long 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 code integer
message Result message string
data Response data object
Response body > data
Field Name Description Type
gameIndex Hive Game Index integer
playerId Hive Player ID long
blockedUsers Blocked List array
Response body > data > blockedusers
Field Name Description Type
blockedPlayerId The Hive player ID of the blocked user long
blockedTime The time of blocking (based on UTC+0, format yyyy-MM-dd'T'HH:mm:ss.SSSZ) string

Request sample

curl  --request GET 'https://sandbox-api-chat.withhive.com/api/v1/games/1/users/1001/blocks' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJnYW1lSW5kZXgiOjEsInBsYXllcklkIjoxLCJpYXQiOjE3MzI1MTcyMzUsImV4cCI6MTczMjUyMDgzNX0.lm5eFqEuSPjsKZUItpTQvFy_2oWrMMJ_J0MPH9VFtNg' 

Response sample

{
  "code": 0,
  "message": "Success.",
  "data": {
    "gameIndex": 1,
    "playerId": 1001,
    "blockedUsers": [
      {
        "blockedPlayerId": 1002,
        "blockedTime": "2023-12-20T10:15:30.123Z"
      },
      {
        "blockedPlayerId": 1003,
        "blockedTime": "2023-12-21T08:45:12.456Z"
      },
      // ... Block list
    ]
  }
}

User block

The user blocks a specific user.

Request URL

Server URL
LIVE https://api-chat.withhive.com/api/v1/games/{gameIndex}/users/{playerId}/block/{blockPlayerId}
SANDBOX https://sandbox-api-chat.withhive.com/api/v1/games/{gameIndex}/users/{playerId}/block/{blockPlayerId}
HTTP METHOD POST

Path parameters

Field Name Description Type Required
gameIndex Hive Game Index string Y
playerId Hive Player ID long Y
blockPlayerId Hive Player ID to Block long 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 POST 'https://sandbox-api-chat.withhive.com/api/v1/games/1/users/1001/block/1002' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJnYW1lSW5kZXgiOjEsInBsYXllcklkIjoxLCJpYXQiOjE3MzI1MTcyMzUsImV4cCI6MTczMjUyMDgzNX0.lm5eFqEuSPjsKZUItpTQvFy_2oWrMMJ_J0MPH9VFtNg' 

Response sample

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

Unblock user

The user unblocks a specific user.

Request URL

Server URL
LIVE https://api-chat.withhive.com/api/v1/games/{gameIndex}/users/{playerId}/block/{blockedPlayerId}
SANDBOX https://sandbox-api-chat.withhive.com/api/v1/games/{gameIndex}/users/{playerId}/block/{blockedPlayerId}
HTTP METHOD DELETE

Path parameters

Field Name Description Type Required
gameIndex Hive game index string Y
playerId Hive player ID long Y
blockedPlayerId Hive player ID to unblock long 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 code integer
message Result message string

Request sample

curl --request DELETE 'https://sandbox-api-chat.withhive.com/api/v1/games/1/users/1001/block/1002' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJnYW1lSW5kZXgiOjEsInBsYXllcklkIjoxLCJpYXQiOjE3MzI1MTcyMzUsImV4cCI6MTczMjUyMDgzNX0.lm5eFqEuSPjsKZUItpTQvFy_2oWrMMJ_J0MPH9VFtNg'

Response sample

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