ข้ามไปที่เนื้อหา

ลงทะเบียนและ解除การระงับการใช้งาน

This API registers a user account as suspended on the Hive server or releases it according to the app operation policy.

API Endpoint คำอธิบาย
POST /v2/game/block/set Register access restriction
POST /v2/game/block/delete Release access restriction


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.

URL คำขอ

URL ใช้งานจริง https://auth.qpyou.cn/v2/game/block/set
URL Sandbox https://sandbox-auth.qpyou.cn/v2/game/block/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
player_id Player ID Integer Y
status Suspension status
  • P: Permanent suspension
  • B: 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

ตัวอย่างคำขอ

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}

เนื้อหาการตอบกลับ

ชื่อฟิลด์ คำอธิบาย ประเภท
result_code รหัสตอบกลับ รายละเอียด 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 พารามิเตอร์ไม่ถูกต้อง
  • The 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 appid ไม่ถูกต้อง

ตัวอย่างการตอบกลับ

สำเร็จ

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

URL คำขอ

URL ใช้งานจริง https://auth.qpyou.cn/v2/game/block/delete
URL Sandbox https://sandbox-auth.qpyou.cn/v2/game/block/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
player_id Player ID Integer Y

ตัวอย่างคำขอ

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

เนื้อหาการตอบกลับ

ชื่อฟิลด์ คำอธิบาย ประเภท
result_code รหัสตอบกลับ รายละเอียด Integer
result_msg ข้อความผลลัพธ์ String
token_validation ผลการตรวจสอบ JWT (ข้อผิดพลาดการตรวจสอบ JWT) Object
token_validation.result_code รหัสผลการตรวจสอบ JWT Integer
token_validation.result_msg ข้อความผลการตรวจสอบ JWT String

รหัสตอบกลับ

Code value คำอธิบาย
0 สำเร็จ
2002 User not registered for suspension
2499 การตรวจสอบ JWT ล้มเหลว (ดู token_validation)
4000 พารามิเตอร์ไม่ถูกต้อง
6000 appid ไม่ถูกต้อง

ตัวอย่างการตอบกลับ

สำเร็จ

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

เมื่อการตรวจสอบ JWT ล้มเหลว คุณสามารถดูข้อมูลข้อผิดพลาดโดยละเอียดได้ในฟิลด์ token_validation โปรดดู รหัสข้อผิดพลาดการตรวจสอบ JWT สำหรับรายละเอียด