Authenticating Authentication v4 custom

The game server can get the data about keys for custom authentication. Game 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
    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 Certification key issued by AppCenter Y
    player_id the PlayerId of a user N (the `player_id` is required when this API is requested with auth_type parameter being set to CONNECT)
  • 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
    {
    "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
    {
    "result_code": 0,
    "result_msg": "SUCCESS",
    "data":{
        "custom_auth_key": "f28ac8415716f438b9c972e3706c0dab"
    }
    }
    
  • Error Code
    Value Description
    0 Success
    1005 Unsupported auth_type
    4200 Unsupported IdP