Register a suspended game server
The Suspended User Information Transmission API provides a function to automatically transmit the information of suspended users to the game server when registering or changing the information. Through this API, you can receive suspended user information in real time to the game server.
- Information Transmission Time: When the suspended user information is newly registered or changed, it is automatically transmitted to the game server. When the suspension is lifted, the information is not transmitted via the API.
- Information Transmission Unit: Up to 100 suspended user information items are transmitted with one request. For example, if there are 2,000 suspended users, 20 requests are sent to the game server, divided into 100 each.
To use the Suspended User Information Transmission API, you must prepare the game server to receive requests. You can set up the game server registration through the following path in the Hive console.
- Path: Hive console > Authentication > Suspension > Register Game Server
Basics¶
Description | |
---|---|
Request URL | URL of the game server of the project registered in the Hive console game server: [Hive console > Authentication > Suspension > Register game server] |
HTTP Method | POST |
Content-type | application/json |
Data Format | JSON |
Authorization | Bearer Game server authentication key |
Note
- Bearer token corresponds to [Hive console authentication > Suspension > Register game server > Project details > Game server authentication key].
- Game server authentication key verification must be developed so that it can be verified on the requested game server.
Request¶
Name | Type | Required | Description |
---|---|---|---|
game_index | Integer | O | Game index |
server_url | String | O | Game server URL |
data | List | O | Suspension user list |
data.player_id | Integer | O | Player ID |
data.status | String | O | Suspension status P: Permanent suspension B: User with suspension period |
data.start_date | String | O | Suspension start date |
data.end_date | String | O | Suspension end date |
Response¶
Name | Type | Description | Note |
---|---|---|---|
result_code | Integer | Result code | * 0: Normal * All other codes are errors (codes responded to by the game server) |
Request examples¶
curl -X POST {URL of the game server of the project registered to the Hive console game server}
-H 'Content-Type: application/json'
-H 'Authorization: Bearer {Game server authentication key issued when registering the Hive console game server}'
-d '{"game_index": 539, "server_url": "{URL of the game server of the project registered to the Hive console game server}", "data": [{"player_id": 1, "status": "B", "start_date": "2024-07-10 20:56:59", "end_date": "2024-07-13 20:56:59"}, {"player_id": 2, "status": "B", "start_date": "2024-07-10 20:56:59", "end_date": "2024-07-20 20:56:59"}, {"player_id": 3, "status": "P", "start_date": "2024-07-10 20:56:59", "end_date": "9999-12-31 00:00:00"}]}'
Request JSON examples¶
{
"game_index": 539,
"server_url": "{URL of the game server of the project registered in the Hive console game server}",
"data": [
{
"player_id": 1,
"status": "B",
"start_date": "2024-07-10 20:56:59",
"end_date": "2024-07-13 20:56:59" }, { "player_id": 2, "status": "B", "start_date": "2024-07-10 20:56:59", "end_date": "2024-07-20 20:56:59" }, { "player_id": 3, "status": "P", "start_date": "2024-07 -10 20:56:59", "end_date": "9999-12-31 00:00:00" } . . .
(Up to 100 suspended users sent. EX) If 2,000 suspended users are registered, a total of 20 game server transmission requests will occur, 100 each.)
]
}