Skip to content

Like

'Like' can be added to or removed from each message in a channel.

  • When you call the API to add or remove a 'like', a like-related event message is sent to all participants in the channel.

Add like API

Adds a 'like' to a specific message.

  • You cannot add a like to a message that you have already liked.
  • You cannot add a like to a notice message.

Request URL

Server URL
LIVE https://plugin-chat.withhive.com/plugin/api/like/v1/games/{gameIndex}/channels/{channelId}/messages/{messageId}
SANDBOX https://sandbox-plugin-chat.withhive.com/plugin/api/like/v1/games/{gameIndex}/channels/{channelId}/messages/{messageId}
HTTP METHOD POST

Path parameters

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

Header parameters

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

Request body

Field Description Type Required
playerId Player ID of the user who liked it long Y

Response body

Field Description Type
code Response code integer
message Result message string

Request sample

curl --location 'https://plugin-chat.withhive.com/plugin/api/like/v1/games/1/channels/open:12345/messages/0196f733-4f33-7a63-a657-5b0e5e792472' \
--header 'Content-Type: application/json' --header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJIaXZlIiwiaWF0IjoxNzAyNDU4MTkzLCJqdGkiOiIxMzY2NDk4MjcxIn0.VSwvsTE-tS0sL_e9p9gNvHRkMCbsycSO4ObE4J2ysjs' \
--data '{"playerId":1}'

Response sample

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

Remove like

Removes a like from a message.

  • You can only remove likes that you have added yourself.

Request URL

Server URL
LIVE https://plugin-chat.withhive.com/plugin/api/like/v1/games/{gameIndex}/channels/{channelId}/messages/{messageId}/players/{playerId}
SANDBOX https://sandbox-plugin-chat.withhive.com/plugin/api/like/v1/games/{gameIndex}/channels/{channelId}/messages/{messageId}/players/{playerId}
HTTP METHOD DELETE

Path parameters

Field Description Type Required
gameIndex Hive game index integer Y
channelId Channel ID string Y
messageId Message ID string Y
playerId Player ID of the user removing the like long Y

Header parameters

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

Response body

Field Description Type
code Response code integer
message Result message string

Request sample

curl --location --request DELETE 'https://plugin-chat.withhive.com/plugin/api/like/v1/games/1/channels/open:12345/messages/0196f733-4f33-7a63-a657-5b0e5e792472/players/1' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJIaXZlIiwiaWF0IjoxNzAyNDU4MTkzLCJqdGkiOiIxMzY2NDk4MjcxIn0.VSwvsTE-tS0sL_e9p9gNvHRkMCbsycSO4ObE4J2ysjs'

Response sample

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

Response code

In addition to the common response codes, the following are response codes specific to the like feature.

HTTP status code Code Message Description
400 10000 The Like not found or deleted. Like information not found
400 10001 Message not found or deleted. Message for like information not found
400 10002 Message already has the Like info. Like information already exists

API response including like information

This section explains the like information included in the response of the channel message history API.

Response body > data > content > pluginData

If a channel message has like information, the like field is included in data > content > pluginData of the channel message history API response body.

Field Description Type
like Like information object

Response body > data > content > pluginData > like

Field Description Type
playerIds Player IDs of users who liked the message long array

Response sample

{
  // ...omitted
        "content": [
            {
                "gameIndex": 1374,
                "from": 1,
                "messageId": "ggJ5Csh15J-mI3i5",
                "extraData": "",
                "pluginData": {
                    "like": {
                        "playerIds": [
                            1
                        ]
                    }
                },
                "to": "public:10",
                "message": "aaa",
                "langCode": "ko",
                "timestamp": "2025-07-17T00:56:17.156Z",
                "timestampMillis": 1752713777156
            }
        ]
  // ...omitted
}