跳转至

登记和删除使用限制类型

This API registers or deletes access restriction types on the Hive server.

API Endpoint 说明
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.

请求 URL

生产 URL https://auth.qpyou.cn/v2/game/block/type/set
沙盒 URL https://sandbox-auth.qpyou.cn/v2/game/block/type/set
HTTP 方法 POST
Content-Type application/json
数据格式 JSON

请求头

字段名称 说明 类型 必填
X-Access-Token 用于应用服务器认证的 OAuth 2.0 Access Token
(请参阅 发行 OAuth Token
String Y
ISCRYPT 数据是否加密(0 = 不加密)(必须传递 0) Integer Y

请求正文

字段名称 说明 类型 必填
appid App ID String Y
type_status Restriction popup type
  • O: operation policy restriction
  • N: temporary restriction
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
  • ko (Korean)
  • en (English)
  • ja (Japanese)
  • zh-hans (Simplified Chinese)
  • zh-hant (Traditional Chinese)
  • de (German)
  • fr (French)
  • ru (Russian)
  • es (Spanish)
  • pt (Portuguese)
  • id (Indonesian)
  • th (Thai)
  • vi (Vietnamese)
  • it (Italian)
  • tr (Turkish)
  • ar (Arabic)
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

请求示例

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":"只今ゲームデータを修正しています。迅速な解決に向けて最善を尽くします。"}]}

响应正文

字段名称 说明 类型
result_code 响应代码 Details Integer
result_msg 结果消息 String
token_validation JWT 验证结果(JWT 验证错误 Object
token_validation.result_code JWT 验证结果代码 Integer
token_validation.result_msg JWT 验证结果消息 String
data 结果数据 Object
data.block_type Registered restriction type number Integer

响应代码

Code value 说明
0 成功
2499 JWT 验证失败(请参阅 token_validation)
4000 无效参数
4014 Restriction popup type mismatch
4015 Missing required restriction registration language (Korean, English)
4016 Restriction type data byte limit exceeded
6000 无效 appid

响应示例

成功

{"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.

请求 URL

生产 URL https://auth.qpyou.cn/v2/game/block/type/delete
沙盒 URL https://sandbox-auth.qpyou.cn/v2/game/block/type/delete
HTTP 方法 POST
Content-Type application/json
数据格式 JSON

请求头

字段名称 说明 类型 必填
X-Access-Token 用于应用服务器认证的 OAuth 2.0 Access Token
(请参阅 发行 OAuth Token
String Y
ISCRYPT 数据是否加密(0 = 不加密)(必须传递 0) Integer Y

请求正文

字段名称 说明 类型 必填
appid App ID String Y
block_type Restriction type number Integer Y

请求示例

{"appid":"com.com2us.hivesdk.normal.freefull.apple.global.ios.universal","block_type":88}

响应正文

字段名称 说明 类型
result_code 响应代码 Details Integer
result_msg 结果消息 String
token_validation JWT 验证结果(JWT 验证错误 Object
token_validation.result_code JWT 验证结果代码 Integer
token_validation.result_msg JWT 验证结果消息 String

响应代码

Code value 说明
0 成功
2499 JWT 验证失败(请参阅 token_validation)
4000 无效参数
4011 Unregistered type
4012 Registered suspended user data exists
6000 无效 appid

响应示例

成功

{"result_code":0,"result_msg":"SUCCESS","token_validation":{"result_code":0,"result_msg":"success"}}
Note

JWT 验证失败时,可在 token_validation 字段中查看详细错误信息。详情请参阅 JWT 验证错误代码