Register a suspended game server
Register game server for user suspension¶
The User Suspension Game Server Registration API provides a feature that automatically sends suspended user information to the game server when that information is registered or changed. With this API, you can receive suspended user information in real time on 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 User Suspension Game Server Registration API, you must prepare a game server that can receive requests. You can configure game server registration in Hive Console through the path below.
- Path: Hive Console > Authentication > User Suspension > Register game server
Basics¶
| Description | |
|---|---|
| Request URL | URL of the game server for the project registered in Hive Console Game Server: [Hive Console > Authentication > User Suspension > Register game server] |
| HTTP Method | POST |
| Content-type | application/json |
| Data Format | JSON |
| Authorization | Bearer Game server authentication key |
Note
- The Bearer token corresponds to [Hive Console > Authentication > User 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 | List of suspended users |
| data.player_id | Integer | O | Player ID |
| data.status | String | O | Suspension status P: Permanent suspension B: User with a 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.)
]
}