Skip to content

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
  • Production: https://auth.qpyou.cn/game/block/set
  • Sandbox: https://sandbox-auth.qpyou.cn/game/block/set
Method POST
HTTP Header
  • Content-type: application/json
  • ISCRYPT: 0
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
  • `P`: Permanent suspension
  • `B`: User with a suspension period
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
  • 0: Success
  • 4000: Invalid parameter
    • If the format of the suspension start date and end date is incorrect
    • If the start date is later than the end date
    • If the current time is later than the end date
  • 4002: certification key mismatch
  • 4011: Unregistered type
  • 4013: did login history verification failed
    • Verification is not available when logged out
  • 6000: Invalid appid
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.

{
"result_code": 0,
"result_msg": "SUCCESS"
}

Release user from suspension

Directly release a specific account from suspension on the Hive Server.

Basics

Request URL
  • Production: https://auth.qpyou.cn/game/block/delete
  • Sandbox: https://sandbox-auth.qpyou.cn/game/block/delete
Method POST
HTTP Header
  • Content-type: application/json
  • ISCRYPT: 0
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
  • 0: Success
  • 2002: User not suspended
  • 4000: Invalid parameter
  • 4002: certification key mismatch
  • 6000: Invalid appid
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.

{
    "result_code": 0,
    "result_msg": "SUCCESS"
}