Register and release access restrictions This API registers a user account as suspended on the Hive server or releases it according to the app operation policy.
Register access restriction If restriction types are registered in advance through Hive Console or the Register restriction type API , you can distinguish permanent restrictions from time-limited restrictions and change restriction information for an existing user identified by PlayerID.
Request URL Field name Description Type Required X-Access-Token OAuth 2.0 Access Token for app server authentication (See OAuth Token issuance ) String Y ISCRYPT Whether data is encrypted (0 = not encrypted) (always send 0) Integer Y
Request body Field name Description Type Required appid App ID String Y player_id Player ID Integer Y status Suspension statusP: Permanent suspensionB: User with a suspension period String Y block_type Restriction type number Must be registered first in [Hive Console > Authentication > Restriction > Type registration] or through the Register restriction type API . Integer Y start_date Suspension start date (format: YYYY-MM-DD HH:mm:ss) String Y end_date Suspension end date (format: YYYY-MM-DD HH:mm:ss) String Y skip_blocked If requested as true and blocking data already exists, returns result_code=0 without changing the blocking data. Boolean N did App identifier created when the app is installed. It identifies the same type of app. Passing a newly issued or existing value returned during SDK initialization verifies the login history on that device. Integer N
Request example To register a time-limited restricted user, set status to B and send start_date and end_date together.
{ "appid" : "com.com2us.hivesdk.normal.freefull.apple.global.ios.universal" , "player_id" : 24000000000 , "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 }
Response body Field name Description Type result_code Response code Details Integer result_msg Result message String token_validation JWT validation result (JWT validation error ) Object token_validation.result_code JWT validation result code Integer token_validation.result_msg JWT validation result message String
Response code Code value Description 0 Success 2499 JWT validation failed (see token_validation) 4000 Invalid parameterThe format of the suspension start or end date is invalid The start date is later than the end date The current time is later than the end date 4011 Unregistered type 4013 did login history verification failed (cannot verify while logged out) 6000 Invalid appid
Response example Success { "result_code" : 0 , "result_msg" : "SUCCESS" , "token_validation" :{ "result_code" : 0 , "result_msg" : "success" }}
Release access restriction Directly releases a specific account from its suspended state on the Hive server.
Request URL Field name Description Type Required X-Access-Token OAuth 2.0 Access Token for app server authentication (See OAuth Token issuance ) String Y ISCRYPT Whether data is encrypted (0 = not encrypted) (always send 0) Integer Y
Request body Field name Description Type Required appid App ID String Y player_id Player ID Integer Y
Request example { "appid" : "com.com2us.hivesdk.normal.freefull.apple.global.ios.universal" , "player_id" : 24000000000 }
Response body Field name Description Type result_code Response code Details Integer result_msg Result message String token_validation JWT validation result (JWT validation error ) Object token_validation.result_code JWT validation result code Integer token_validation.result_msg JWT validation result message String
Response code Code value Description 0 Success 2002 User not registered for suspension 2499 JWT validation failed (see token_validation) 4000 Invalid parameter 6000 Invalid appid
Response example Success { "result_code" : 0 , "result_msg" : "SUCCESS" , "token_validation" :{ "result_code" : 0 , "result_msg" : "success" }}
Note When JWT validation fails, you can check detailed error information in the token_validation field. For details, see JWT validation error codes .