Authenticating Authentication v4 custom

The game server can get the data about keys for custom authentication. The game server implements this API directly to search the lists server to server. Successful Response outputs custom auth key.

       
  • Request URL
    Common URL https://auth.qpyou.cn/game/customauth/get-key
    Hive sandbox URL https://sandbox-auth.qpyou.cn/game/customauth/get-key
    HTTP Method Post
    Content-Type application/json
    Data Format JSON
  • Request Header
    Field Name Description Required
    ISCRYPT Encrypted data, 0=Not encrypted Y
       
  • Request Body            
    Field Name Description Required
    appid App ID Y
    idp_id IdP identifier Y
    idp_user_id User ID provided by IdP Y
    auth_type Use of custom authentication key     SIGNINIDP: New IdP sync and authentication     CONNECT: Synced the IdP with the PlayerID Y
    hive_certification_key Hive Certificate Key issued by App Center Y
    player_idthe PlayerID of a userN (the `player_id` is required when this API is requested with auth_type parameter being set to CONNECT)
Note

For the idp_id field, you must use one of the following string values as shown in the example:

  • CUSTOM_FIREBASE
  • CUSTOM_FACEBOOK
  • CUSTOM_GOOGLE
  • CUSTOM_SIGNIN_APPLE
  • CUSTOM_TWITTER
  • CUSTOM_NAVER
  • CUSTOM_GAME
       
  • Response Body
    Field Name Description Type
    result_code Result code Integer
    result_msg Result message String
    custom_auth_key Custom auth key String
     
  • Request Sample     ```json { "appid" : "com.com2us.hivesdk.normal.freefull.apple.global.ios.universal", "idp_id" : CUSTOM_TWITTER, "idp_user_id" : "1204273895139753984", "auth_type" : "SIGNINIDP", "hive_certification_key" : "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJIaXZlIiwiaWF0IjoxNjAyMDU2NzMyLCJqdGkiOiItMTY2NDUzNjYzMyJ9.IUfnDZFFJqKXlRJfe3O_lu1G9PHQoFctuXPHlB1p7GU", "player_id" : 10012038880 } ```
     
  • Response Sample     ```json { "result_code": 0, "result_msg": "SUCCESS", "data":{ "custom_auth_key": "f28ac8415716f438b9c972e3706c0dab" } } ```
     
  • Error Code
    Value Description
    0 Success
    1005 Unsupported auth_type
    4200 Unsupported IdP