Register and delete access restriction types¶
This API registers or deletes access restriction types on the Hive server.
| API Endpoint | Description |
|---|---|
POST /v2/game/block/type/set | Register restriction type |
POST /v2/game/block/type/delete | Delete restriction type |
Register restriction type¶
Registers the type to apply when suspending use. Registered types are used as the restriction type number (block_type) in the Register access restriction API. Choose either operation policy restriction (type_status=O) or temporary restriction (type_status=N) as the popup type. Korean and English are required registration languages.
Request URL¶
| Production URL | https://auth.qpyou.cn/v2/game/block/type/set |
|---|---|
| Sandbox URL | https://sandbox-auth.qpyou.cn/v2/game/block/type/set |
| HTTP Method | POST |
| Content-Type | application/json |
| Data Format | JSON |
Request header¶
| 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 |
| type_status | Restriction popup type
| String | Y |
| type_name | Restriction type name (Korean) Can be registered up to 200 bytes. | String | Y |
| type_en_name | Restriction type name (English) Can be registered up to 200 bytes. | String | Y |
| reasons | Restriction reason list (message array by language) | Array | Y |
| reasons[].language | Language code
| String | Y |
| reasons[].title | Restriction reason title Required when type_status=N; causes an error when sent with type_status=O.Can be registered up to 200 bytes. | String | Conditional |
| reasons[].reason | Restriction reason content Up to 200 bytes for type_status=O and up to 400 bytes for type_status=N. | String | Y |
Request example¶
Operation policy restriction type registration request¶
{"appid":"com.com2us.hivesdk.normal.freefull.apple.global.ios.universal","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":"使用非法程序"}]}
Temporary restriction type registration request¶
{"appid":"com.com2us.hivesdk.normal.freefull.apple.global.ios.universal","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":"只今ゲームデータを修正しています。迅速な解決に向けて最善を尽くします。"}]}
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 |
| data | Result data | Object |
| data.block_type | Registered restriction type number | Integer |
Response code¶
| Code value | Description |
|---|---|
| 0 | Success |
| 2499 | JWT validation failed (see token_validation) |
| 4000 | Invalid parameter |
| 4014 | Restriction popup type mismatch |
| 4015 | Missing required restriction registration language (Korean, English) |
| 4016 | Restriction type data byte limit exceeded |
| 6000 | Invalid appid |
Response example¶
Success¶
{"result_code":0,"result_msg":"SUCCESS","token_validation":{"result_code":0,"result_msg":"success"},"data":{"block_type":88}}
Delete restriction type¶
Deletes a registered restriction type from the Hive server. Types that have currently suspended user data cannot be deleted.
Request URL¶
| Production URL | https://auth.qpyou.cn/v2/game/block/type/delete |
|---|---|
| Sandbox URL | https://sandbox-auth.qpyou.cn/v2/game/block/type/delete |
| HTTP Method | POST |
| Content-Type | application/json |
| Data Format | JSON |
Request header¶
| 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 |
| block_type | Restriction type number | Integer | Y |
Request example¶
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 parameter |
| 4011 | Unregistered type |
| 4012 | Registered suspended user data exists |
| 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.