Validate Token

After a successful login to the game client, the game server can verify the validity of the token key of the logged-in user via the token, the PlayerID, and the DID in the PlayerInfo response value.
Therefore, if your game doesn’t allow duplicate login, make sure to manage the already verified token key or manage the session key from the game side to implement the login feature.

  • Request URL
    Common URL https://auth.qpyou.cn/game/token/get-token
    Distributed Environment URL https://auth.globalwithhive.com/game/token/get-token
    Sandbox URL https://sandbox-auth.qpyou.cn/game/token/get-token
    HTTP Method Post
    Content-Type text/html
    Data Format JSON
  • Request Header
    Field Name Description Type Required
    Authorization Returned token key after sign-in String Y
    ISCRYPT Encrypted data, 0=Not encrypted Integer Y
  • Request Body
    Field Name Description Type Required
    appid AppID of a game which user signed in String Y
    did Returned DID after sign-in String Y
    player_id Returned PlayerID of authentication v4 after sign-in Integer Y
    hive_certification_key Hive certification key(Issued by AppCenter) See more String N
  • Response
    Field Name Description Type
    result_code Verification result. 0=success More… Integer
    result_msg Result message String
  • Request Sample
  • Response Sample
  • Error Code
    Value Description
    0 Success
    2300 Required repayment for a refunded item
    4000 Invalid parameter
    4001 request json error
    4002 Hive certification key error
    5000 DB error
    5001 Invalid token in distributed environment (AWS)
    6000 Invalid AppID
    6001 IdP token error
    7000 Invalid token
    7001 No token in header field
    9999 Unknown error

Validates token, returns IdP ID list for a PlayerID

After a successful login to the in-game community, use the token, PlayerID, AppID, and DID (the Authorization token, PlayerID, and DID are returned in PlayerInfo after login) to verify the validity of the logged-in user token, and get the list of IdP IDs corresponding to the PlayerID.

  • Request URL
    Commercial Server URL https://auth.qpyou.cn/server/player/get-idpuserid
    Distributed Environment URL https://auth.globalwithhive.com/server/player/get-idpuserid
    Sandbox URL https://sandbox-auth.qpyou.cn/server/player/get-idpuserid
    HTTP Method Post
    Content-Type application/json
    Data Format JSON
  • Request Header
    Field Name Description Type Required
    Authorization the token returned after successful login String Y
    ISCRYPT Encrypted data, 0=Not encrypted Integer Y
  • Request Body
    Field Name Description Type Required
    appid the AppID of the game a user is logged into String Y
    did the DID returned after successful login String Y
    player_id the PlayerID returned after successful login Integer Y
  • Request Body Example
  • Response Body
    Field Name Description Type
    result_code verification result,

    • 0: Success
    • 4000: the parameter value is invalid.
    • 7000: the verification failed. the verification token value does not match.
    Integer
    result_msg the result message String
    data the result data JSON
  • Response Bodydata
    Field Name Description Type
    data.list the result data list Array
    data.list.player_id the PlayerID requested in the request body String
    data.list.idp_user_id Account Token (uid) passed from IdP String
    data.list.idp_index
      idp_index

    • 1: HIVE
    • 2: Facebook
    • 3: GOOGLE
    • 9: APPLE
    String
  • Response Body Sample