Access restriction API guide¶
Registration of suspension of use¶
In accordance with your operational policy, we provide a feature to set an account be suspended on the Hive Server. By pre-registering the types of suspension in the Hive Console, you can distinguish and register both permanently suspended users and users with a temporary suspension period. Additionally, you can change the suspension type and suspension period for users (distinguished by PlayerID) who have already been registered.
Basics¶
| Request URL |
|
|---|---|
| Method | POST |
| HTTP Header |
|
| Response Format | JSON |
Request¶
| Parameter | Type | Required | Description |
|---|---|---|---|
| appid | String | O | AppID |
| player_id | Integer | O | Player ID |
| hive_certification_key | String | O | certification key (issued from the App Center) |
| status | String | O | Suspension status
|
| block_type | Integer | O | Restriction type number You must register it first in [Hive Console > Authentication > Restriction > Type registration]. |
| start_date | String | O | Suspension start date |
| end_date | String | O | Suspension end date |
| skip_blocked | Boolean | X | If you request with skip_blocked=true and blocking data already exists, it returns result_code=0 without changing the blocking data. |
| did | Integer | X | This is a game app identifier created when the game app is installed. It is used to identify the same type of game app. If you pass a value that is newly issued or already exists and is returned during SDK initialization, the login history on that device is verified. |
Response¶
| Parameter | Type | Description |
|---|---|---|
| result_code | Integer | Result code
|
| result_msg | String | the result message about the cause of suspension |
Example request to register a user with a time-limited restriction¶
To register a user with a time-limited restriction, set status to B and send start_date and end_date together.
curl -X POST https://auth.qpyou.cn/game/block/set \
-H 'Content-Type: application/json' \
-H 'ISCRYPT: 0' \
-d '{"appid" : "com.com2us.hivesdk.normal.freefull.apple.global.ios.universal", "player_id" : 24000000000, "hive_certification_key" : "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJIaXZlIiwiaWF0IjoxNjAyMDU2NzI2LCJqdGkiOiIxODczMTExMzIwIn0.3soFiHTPlObCoqR5xX9ZeOQTSvnHrHDHWmopP3QfWtY", "status" : "B", "block_type" : 18, "start_date" : "2024-06-03 00:00:00", "end_date" : "2024-06-30 23:59:59", "skip_blocked" : true, "did" : 2000000}'
Example successful response for registering a user with a time-limited restriction¶
If the request is processed successfully, result_code is returned as 0 and result_msg as SUCCESS.
Release user from suspension¶
Directly release a specific account from suspension on the Hive Server.
Basics¶
| Request URL |
|
|---|---|
| Method | POST |
| HTTP Header |
|
| Response Format | JSON |
Request¶
| Field | Type | Required | Description |
|---|---|---|---|
| appid | String | O | AppID |
| player_id | Integer | O | PlayerID |
| hive_certification_key | String | O | certification key (issued in the App Center) |
Response¶
| Field | Type | Description |
|---|---|---|
| result_code | Integer |
|
| result_msg | String | Result message |
Example request for lifting a restriction¶
To lift the restriction for a specific account, send appid, player_id, and hive_certification_key together in the request format below.
curl -X POST https://auth.qpyou.cn/game/block/delete \
-H 'Content-Type: application/json' \
-H 'ISCRYPT: 0' \
-d '{"appid" : "com.com2us.hivesdk.normal.freefull.apple.global.ios.universal", "player_id" : 24000000000, "hive_certification_key" : "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJIaXZlIiwiaWF0IjoxNjAyMDU2NzI2LCJqdGkiOiIxODczMTExMzIwIn0.3soFiHTPlObCoqR5xX9ZeOQTSvnHrHDHWmopP3QfWtY"}'
Example successful response for lifting a restriction¶
If the request is processed successfully, result_code is returned as 0 and result_msg as SUCCESS.