Skip to content

Get IdP list

Uses the Player ID and App ID returned after a successful login from the app client to retrieve the list of IdPs (Identity Providers) linked to the player from the app server.

The 'Get IdP list' API operates through Server-to-Server communication, where the app server calls the Hive authentication server directly. When the request succeeds, linked IdP information is returned as an array in the response's data field.

When making the request, App ID and Player ID are required parameters.


Request URL

Production URL https://auth.qpyou.cn/v2/game/player/get-idp
Distributed environment URL https://auth.globalwithhive.com/v2/game/player/get-idp
Sandbox URL https://sandbox-auth.qpyou.cn/v2/game/player/get-idp
HTTP Method POST
Content-Type application/json
Data Format JSON
Note

The Hive authentication server is configured in a distributed environment to prepare for failures or unstable network communication.
If a failure occurs while communicating with the authentication server host, or if the timeout defined on the app server is exceeded, the app server must directly call the distributed environment URL (Fallback URL).


Request header

Field name Description Type Required
X-Access-Token OAuth 2.0 Access Token for game server authentication
(See Issue OAuth token)
String Y
ISCRYPT Whether data is encrypted (0 = not encrypted; always pass 0) Integer Y


Request body

Field name Description Type Required
appid App ID String Y
player_id Authentication Player ID returned after successful login BigInteger Y


Request example

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


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 IdP list data Array
data[].seq User primary key (PK) BigInteger
data[].player_id Player ID BigInteger
data[].idp_user_id User ID value provided by the IdP String
data[].idp_index IdP unique number Details Integer
data[].idp_id String value of the IdP String

Result code

Code value Description
0 Success
2002 No user data
4000 Invalid parameter
2499 JWT validation failed (see token_validation)


Response example

Success

{
    "result_code": 0,
    "result_msg": "SUCCESS",
    "token_validation": {
        "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"
        }
    ]
}

JWT validation failure

{
    "result_code": 2499,
    "result_msg": "JWT validation failed. See token_validation for details.",
    "token_validation": {
        "result_code": 2408,
        "result_msg": "The access token is expired. Please refresh your token."
    }
}
Note

When JWT validation fails, you can check detailed error information in the token_validation field. For details, see JWT validation error codes.

IdP index

For IdP index information, see the IdP list.