Skip to content

Load login page v1

Load login page v1

This API loads the URL address for the web login where users actually can log in. When a user is logged in, the redirect URL set by the app developer, the playerId and the authorization token for logic verification are returned. The supported IdP accounts are Hive, Google, Facebook, and Apple accounts.

We do not recommend using the Web Login V1 API when you have developed your app with the Hive SDK. This is because that as the PlayerID includes game play records, if a user attempts to link an account they previously logged into with Web Login V1 to an account they currently are logged into on the game, it may result in an account conflict.

Note

To use Web Login V1, you must first complete the related settings in the Hive Console App Center as follows. For more details, please check the Console Guide.

 

  • Request URL
    Commercial Server URL https://weblogin.withhive.com/login?param=
    Sandbox URL https://sandbox-weblogin.withhive.com/login?param=
  • Request Header
    HTTP Method GET
    Content-Type text/html
  • Query Parameters
    Field Name Type Description Required
    param string

    The param string value is created through URL encoding and BASE64 encoding of the JSON data composed of the key values in the table below.

    Y
  • Query Parameters - param
    Field Name Type Description
    appid string Application ID used by Hive Server
    gindex string Game Index information used Hive Server. App Center > Game List > Search your game and click it > Click the AppID tab > Click the game’s AppID > Check the Basic Info tab to get the Game Index.
    url string This is the URL address to redirect to after the completion of the user login. It should be the same URL as the redirect URL set in the Hive Console.
    country string the country code set by the game or community. If this value is not provided, the web browser default value is used.
    language string the the language code set by the game or community. If this value is not provided, the web browser default value is used.
  • Request Example
    // the original param composed of JSON object. The string value obtained by performing URL encoding and BASE64 encoding sequentially on this JSON object is used as a query parameter when calling the API.
    {
            "appid":"com.com2us.hivesdk.ios.community.global.normal",
            "gindex":"539",
            "url":"https://community.withhive.com/hivesdk/login/redirect",
            "country":"KR",
            "language":"ko"
    }
    
    // Call the API attaching the encoded param to the request URL as a query parameter.
    https://weblogin.withhive.com/login?param=JTdCJTIyYXBwaWQlMjIlM0ElMjJjb20uY29tMnVzLmhpdmVzZGsuaW9zLmNvbW11bml0eS5nbG9iYWwubm9ybWFsJTIyJTJDJTIyZ2luZGV4JTIyJTNBJTIyNTM5JTIyJTJDJTIydXJsJTIyJTNBJTIyaHR0cHMlM0ElMkYlMkZjb21tdW5pdHkud2l0aGhpdmUuY29tJTJGaGl2ZXNkayUyRmxvZ2luJTJGcmVkaXJlY3QlMjIlMkMlMjJjb3VudHJ5JTIyJTNBJTIyS1IlMjIlMkMlMjJsYW5ndWFnZSUyMiUzQSUyMmtvJTIyJTdE
    
  • Response Body

    Returns the redirect URL provided in the API request with the “res” attached as a query parameter. See the description below for an explanation of res.

    Field Name Description Type Required
    URL the redirect URL provided in the API request with the “res” attached as a query parameter string Y
  • Response Sample
    // If https://community.withhive.com/hivesdk/login/redirect was set as the redirect URL
    https://community.withhive.com/hivesdk/login/redirect?res=JTdCJTIyY29kZSUyMiUzQSUyMjEwMCUyMiUyQyUyMnBpZCUyMiUzQSUyMjIwMDAwMDE0NTQ0JTIyJTJDJTIydG9rZW4lMjIlM0ElMjIxNjg4MTA5MDQ0NTgzLWpmNWJwUjY3MFVMSmhsQlpoVTlUN0IlMjIlN0Q=
    
  • Response Body - res

    The res is obtained by converting the JSON object composed of the key values below into string via the URL encoding and the BASE64 encoding. To use a JSON object, do the BASE64 decoding and then the URL decoding. The JSON object is shown below.

    Field Name Description Type
    code Response code (100: success) string
    pid the Player ID verified by the Hive Server string
    token the token for the verification of Player ID string
  • Response Sample - res
    {
            "code": "100",
            "pid": "20000009891",
            "token": "1627881984263-jkx1B3GOY3EsJ"
    }