เซิร์ฟเวอร์เกมสามารถค้นหาไฟล์ IdP รายการที่เชื่อมโยงกับเกมโดยใช้รหัสผู้เล่นและ AppID กลับมาจากไคลเอนต์เกมหลังจากเข้าสู่ระบบสำเร็จ เกมใช้สิ่งนี้ API โดยตรงเพื่อค้นหารายการเซิร์ฟเวอร์ไปยังเซิร์ฟเวอร์
Request รวมถึง AppId และ PlayerID เป็นพารามิเตอร์ที่จำเป็นและประสบความสำเร็จ Response เอาท์พุท IdP ข้อมูลผ่านกลุ่มตัวแปรภายใต้ Data ตามจำนวน IdPเชื่อมต่อกับ PlayerID.
- Request URL
Common URL https://auth.qpyou.cn/game/player/get-idp Distributed Environment URL https://auth.globalwithhive.com/game/player/get-idp Sandbox URL https://sandbox-auth.qpyou.cn/game/player/get-idp HTTP Method Post Content-Type application/json Data Format JSON
- Request Header
Field Name Description Type Required ISCRYPT Whether data is encrypted (0= not encrypted) Integer Y
(Always send 0)
- Request Body
Field Name Description Type Required appid AppID of a game which user signed in String Y player_id Returned PlayerID of authentication v4 after sign-in BigInteger Y hive_certification_key Hive certification key(Issued by AppCenter) See more String N
- Request Sample
12345{"appid":"com.com2us.hivesdk.normal.freefull.apple.global.ios.universal","player_id": 90000000062,"hive_certification_key" : "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJIaXZlIiwiaWF0IjoxNjAyMDU2NzI2LCJqdGkiOiIxODczMTExMzIwIn0.3soFiHTPlObCoqR5xX9ZeOQTSvnHrHDHWmopP3QfWtY"}
- Response Body
Field Name Description Type Value result_code Search result Integer 0 result_msg Result message String 0 data JSON data.seq Primary key (PK) for player BigInteger 14 data.player_id PlayerID BigInteger 12 data.idp_user_id User ID provided by IdP String data.idp_index Unique IdP index String data.idp_id IdP identifier String HIVE, FACEBOOK …
- Request Sample
123456{"appid":"com.withhive","did":"255764404509548","player_id": 21}
- Response Sample
1234567891011121314151617181920{"result_code": 0,"result_msg": "SUCCESS","data":[{"seq": 10000000067,"player_id": 90000000062,"idp_user_id": "0","idp_index": 0,"idp_id": "GUEST"},{"seq": 10000000068,"player_id": 90000000062,"idp_user_id": "64646595","idp_index": 1,"idp_id": "HIVE"}]}
- Result รหัส
Value Description 0 Success 2002 No user data exists 4000 Invalid parameter 4002 Hive certification key error
- idp_index
idp_index idp_id Description 0 GUEST Players who did not athenticate IdP 1 HIVE HIVE 2 FACEBOOK Facebook 3 GOOGLE Google (Play Games Services) 4 QQ QQ 5 WEIBO Weibo 6 VK VK 7 WECHAT WeChat 8 APPLE Apple Game Center 9 SIGNIN_APPLE Apple Login 10 LINE Line 12 WEVERSE Weverse