Skip to content

Retrieve user info with authentication API

The User Information Retrieval via Authentication API is an API that is requested when it is necessary to check user information separately after completing web login.

Returns user information corresponding to the IdP using the response values appid, idp_index, and idp_user_id from the Login Verification and User Information Retrieval API.

Request URL

Environment URL
Production https://auth.qpyou.cn/game/player/get-playerid
Production https://auth.globalwithhive.com/game/player/get-playerid
Sandbox https://sandbox-auth.qpyou.cn/game/player/get-playerid
HTTP Method POST
Content-Type application/json
Note

Authentication v4 is designed to create a distributed environment in case of failures or network communication issues. If a failure or network communication anomaly exceeds the communication timeout defined for the game server, the distributed environment URL must be called.

Request Header

Field Name Type Description Required
ISCRYPT Integer Whether data is encrypted (0: not encrypted) Y

Request Body

Field Name Type Description Required
appid String App ID Y
idp_index Integer IdP Index
  • 1: Hive
  • 2: Facebook
  • 3: Google
  • 9: Apple
Y
idp_user_id String IdP Unique Identifier Y
hive_certification_key String Hive Certification Key (Hive Console > App Center > Project Management > Game Details > Basic Information > Hive Certification Key) Y

Request Body Example

{
  "appid": "com.com2us.hivesdk.normal.freefull.google.global.android.common",
  "idp_index": 1,
  "idp_user_id": "68101398",
  "hive_certification_key": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJIaXZlIiwiaWF0IjoxNjAyMDU2NzI2LCJqdGkiOiIxODczMTExMzIwIn0.3soFiHTPlObCoqR5xX9ZeOQTSvnHrHDHWmopP3QfWtY"
}

Response Body

Field Name Type Description Remarks
result_code Integer Result Code
result_msg String Result Message
data JSON Result Data
data.enc_idp String Key for encrypting Request Body information One-time token for external automatic login on PC
data.player_id BigInteger PlayerID
data.list Array Linked IdP List List containing information of IdPs linked by the user
data.list.seq BigInteger Linked IdP List - Seq Sequence Key used only in authentication
data.list.player_id BigInteger Linked IdP List - PlayerID
data.list.idp_user_id String Linked IdP List - Unique Identifier of IdP
data.list.idp_index Integer Linked IdP List - IdP Index
  • 1: Hive
  • 2: Facebook
  • 3: Google
  • 9: Apple
data.list.idp_id String Linked IdP List - IdP ID GUEST is created by default even if played with another IdP
data.is_blocked Boolean Whether the user is blocked
  • true: Blocked user
  • false: Normal user
data.is_refund Boolean Whether the user is subject to re-payment for refunds
  • true: User subject to re-payment for refunds
  • false: User not subject to re-payment for refunds

Result Code

result_code Description
0 Success
2002 No user data
4000 Invalid request parameter

Response Body Sample (User Information Exists)

{
  "result_code": 0,
  "result_msg": "SUCCESS",
  "data": {
    "enc_idp": "K+A4xduO7kf5OrJ/iDPqL0PtMxwu7wW8JSBO+JJwSDDmJLvIi/6LG7TyWXdEHr9RNHM+/QXwc0+Y9z2eSRg7oeBBHmpOajzF1iiaacbFom4CsNy2fItendset7T0i0WYdyLQih3z5mDjcct47+gg2ovbp6kWRY8D+aGq+ZgaKiyr0Hmb1xmbWY/7cl1FjXTm0Nl9CWhO418bJFdwOpi+bw==",
    "player_id": 20000016588,
    "list": [
      {
        "seq": 25771,
        "player_id": 20000016588,
        "idp_user_id": "68101398",
        "idp_index": 1,
        "idp_id": "HIVE"
      },
      {
        "seq": 25772,
        "player_id": 20000016588,
        "idp_user_id": "0",
        "idp_index": 0,
        "idp_id": "GUEST"
      }
    ],
    "is_blocked": false,
    "is_refund": false
  }
}

Response Body Sample (No user information)

{
  "result_code": 2002,
  "result_msg": "No User",
  "data": {
    "enc_idp": "K+A4xduO7kf5OrJ/iDPqLyCHfP+L3wz0WTNVw5KHLCqYjqQ+shQ2P3mkgwYCMvlnPatzlSE5ZFINr5gEIxK14sg0N8kOPSjSCeQ9UGGt11OMrYsGTuys0KmPJ2ZU/UWVVxpP1Lxx1eS8VbYwLmoTG+HTw2vkocghs/ZOZ9rqisdBRprhp6Q6+lIjpaUzDa2yy2guM1WheuVzKGL5331HHgo557RqoyUzTc6Lkf8ArWZ/XSwi3ZmStmhz/U4thcIwiowqgV+Ecdb2+WmMZ1MgGT4Xvbxa4lqzToBC3nxDvi1d8TjgMaszVYoNct94WPBGvV6emg3GqiJG+0ZTGg53+mZad9ttkUpTnQXetz5UDTxe5NnFAYfffzBq3jkqfAB042eH21rE3uTVJq3HuO8i9t1LJwKFfkC7sjjuaKNWsjs="
  }
}

Response Body Sample (Failure)

{
  "result_code": 4000,
  "result_msg": "Request has invalid format.",
  "data": "appid, idp_user_id, idp_index"
}