Register and unregister access restriction types
Register access restriction type¶
Register the type to apply when restricting access on the Hive server. The registered type is used as the access restriction type number (block_type) parameter in the Register access restriction API. For the popup format, choose between operations policy restriction (type_status=O) and temporary restriction (type_status=N), and Korean and English are required registration languages. See the console guide Authentication > Access Restriction > Register Type.
Basics¶
| Description | |
|---|---|
| Request URL | Production: https://auth.qpyou.cn/game/block/type/set Sandbox: https://sandbox-auth.qpyou.cn/game/block/type/set |
| Method | POST |
| HTTP Header | Content-type: application/json ISCRYPT: 0 |
| Response Format | JSON |
Request¶
| Parameter | Type | Required | Description |
|---|---|---|---|
| appid | String | O | App ID |
| hive_certification_key | String | O | Hive authentication key (issued in App Center) Learn more |
| type_status | String | O | Access restriction popup format
|
| type_name | String | O | Access restriction type name (Korean) You can register up to 200 bytes. |
| type_en_name | String | O | Access restriction type name (English) You can register up to 200 bytes. |
| reasons | Array | O | Access restriction reason list (array of messages by language) |
| reasons[].language | String | O | Language code
|
| reasons[].title | String | O (type_status=N), X (type_status=O) | Access restriction reason title When type_status=N (temporary restriction), you must send this value, and if you send it when type_status=O (operations policy restriction), an error occurs.You can register up to 200 bytes. |
| reasons[].reason | String | O | Access restriction reason details For operations policy restriction ( type_status=O), you can register up to 200 bytes. For temporary restriction (type_status=N), you can register up to 400 bytes. |
Response¶
| Parameter | Type | Description |
|---|---|---|
| result_code | Integer | Result code
|
| result_msg | String | Result message |
| data | Object | Result data |
| data.block_type | Integer | Registered access restriction type number |
Request to register an operations policy restriction type¶
Use this request when registering an operations policy restriction type. Set type_status to O and send the access restriction reason details by language.
curl -X POST https://auth.qpyou.cn/game/block/type/set \
-H 'Content-Type: application/json' \
-H 'ISCRYPT: 0' \
-d '{"appid": "com.com2us.hivesdk.normal.freefull.google.global.android.common", "hive_certification_key": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJIaXZlIiwiaWF0IjoxNjAyMDU2NzI2LCJqdGkiOiIxODczMTExMzIwIn0.3soFiHTPlObCoqR5xX9ZeOQTSvnHrHDHWmopP3QfWtY", "type_status": "O", "type_name": "불법 프로그램 이용", "type_en_name": "Usage of unauthorized programs", "reasons": [{"language": "ko", "reason": "불법 프로그램 이용"}, {"language": "en", "reason": "Use of Unauthorized Programs"}, {"language": "ja", "reason": "使用非法程序"}]}'
Request to register a temporary restriction type¶
Use this request when registering a temporary restriction type. Set type_status to N and send the title and reason details by language.
curl -X POST https://auth.qpyou.cn/game/block/type/set \
-H 'Content-Type: application/json' \
-H 'ISCRYPT: 0' \
-d '{"appid": "com.com2us.hivesdk.normal.freefull.google.global.android.common", "hive_certification_key": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJIaXZlIiwiaWF0IjoxNjAyMDU2NzI2LCJqdGkiOiIxODczMTExMzIwIn0.3soFiHTPlObCoqR5xX9ZeOQTSvnHrHDHWmopP3QfWtY", "type_status": "N", "type_name": "임시 접속 제한(게임 데이터 수정)", "type_en_name": "Temporary access restriction (game data modified)", "reasons": [{"language": "ko", "title": "게임 이용에 불편을 드려 죄송합니다.", "reason": "현재 게임 데이터를 수정하는 중입니다. 빠른 조치를 위해 최선을 다하겠습니다."}, {"language": "en", "title": "We apologize for any inconvenience you may have experienced.", "reason": "We are currently modifying the game data. We will try our best to resolve the issue as soon as possible."}, {"language": "ja", "title": "ご利用中にご不便をおかけし、大変申し訳ございません。", "reason": "只今ゲームデータを修正しています。迅速な解決に向けて最善を尽くします。"}]}'
Check response for access restriction type registration¶
If the type registration request succeeds, check the registered access restriction type number in the response data's block_type value.
Delete access restriction type¶
Delete a registered access restriction type from the Hive server. A type with existing user data currently under access restriction cannot be deleted.
Basics¶
| Description | |
|---|---|
| Request URL | Production: https://auth.qpyou.cn/game/block/type/delete Sandbox: https://sandbox-auth.qpyou.cn/game/block/type/delete |
| Method | POST |
| HTTP Header | Content-type: application/json ISCRYPT: 0 |
| Response Format | JSON |
Request¶
| Parameter | Type | Required | Description |
|---|---|---|---|
| appid | String | O | App ID |
| hive_certification_key | String | O | Hive authentication key (issued in App Center) Learn more |
| block_type | Integer | O | Access restriction type number |
Response¶
| Parameter | Type | Description |
|---|---|---|
| result_code | Integer | Result code
|
| result_msg | String | Result message |
Request examples¶
curl -X POST https://auth.qpyou.cn/game/block/type/delete \
-H 'Content-Type: application/json' \
-H 'ISCRYPT: 0' \
-d '{"appid": "com.com2us.hivesdk.normal.freefull.google.global.android.common", "hive_certification_key": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJIaXZlIiwiaWF0IjoxNjAyMDU2NzI2LCJqdGkiOiIxODczMTExMzIwIn0.3soFiHTPlObCoqR5xX9ZeOQTSvnHrHDHWmopP3QfWtY", "block_type": 88}'