Skip to content

Crossplay Launcher Remote Launch API

Overview

The Crossplay Launcher Remote Execution API provides a function to query the list of running PCs and select a specific PC to remotely execute the game if the game is terminated unintentionally while running with the Crossplay Launcher.

It is largely composed of PC List Query API and PC Remote Execution API.

Prerequisites

  • Windows version of Hive SDK v4.24.4.0 or higher
  • Crossplay Launcher 1.0.16.0 or higher

Basic operation flow

  • Set whether to use remote execution for each game

    Note

    Currently, only the manual setting of whether to use remote execution is supported, and the automatic setting function will be provided in the future.

  • Run the game on a Windows PC via the Crossplay Launcher.

  • Call the PC List Query API in the game to query the list of PCs running with the Crossplay Launcher.
  • Call the PC Remote Run API with the information of the PC selected from the PC list as a result of the query.
    (External auto-login token is passed to the selected PC.)
  • Reconnect to the game and auto-login using the external auto-login token from the Crossplay Launcher.

PC List Query API

This is an API that queries the list of PCs that are currently running with the Crossplay Launcher and are capable of remote execution.

Note
  • The PC list query is only possible if the request is valid after verification via the Token Verification API.

Request URL and conditions

Category URL and Conditions
Commercial URL https://api-launcherplay.withhive.com/api/pc/list
SANDBOX URL https://sandbox-api-launcherplay.withhive.com/api/pc/list
HTTP Method PUT
Data Format JSON

Request header

Field name Description Type Required
Content-Type application/json String Y
Authorization Bearer token key
(Token key returned after successful login)
String Y

Request header sample

Content-Type : application/json
Authorization : Bearer b630b963152efa1f97a8c066831222

Request body

Field name Description Type Required
appId AppID of the logged-in game String Y
playerId PlayerID of V4 authentication returned after successful login String Y
did DID returned after successful login String Y

Request body sample

{
    "appId" : "com.com2us.hivesdk.normal.freefull.google.global.android.common",
    "playerId" : "20000023036",
    "did" : "304166094"
}

Response body

Field name Description Type
code Response result code Integer
msg Response result message String
data List of executable PCs Array
pc_name PC name String
did Device information String

Response body sample

{
    "code": 100,
    "msg": "success",
    "data": [
        {
            "pc_name" : "pc1",
            "did" : "304162817",
        },
        {
            "pc_name" : "pc2",
            "did" : "304166094"
        },
        ...
    ]
}

Response code specification

code msg description
100 success success
101 success(not exist) success
└ However, since there is no list that can be executed remotely, data is not returned
400 fail(Authorization parameter error) Invalid header parameter
└ Authorization
401 fail(method error) Invalid HTTP METHOD request
402 fail(request parameter error) Request parameter does not exist
403 fail(appId parameter error) Invalid parameter
└ appId
404 fail(playerId parameter error) Invalid parameter
└ playerId
405 fail(did parameter error) Invalid parameter
└ did
500 fail(hiveCertificationKey error) Failed to retrieve the corresponding game information (Hive authentication key)
501 fail(####) Other #### error occurred while verifying the authentication server
502 fail(####) Other #### error occurred while retrieving the PC list
503 fail(####) When accessing Redis to retrieve the PC list, a #### error occurs
900 fail(curl error - ####) Authentication server verification in progress, curl error occurs when calling the API (#### error occurs)
901 fail(api error - ####) Authentication server verification failed (#### error occurs)

PC Remote Execution API

This is an API that transmits token information to remotely execute a PC selected from the retrieved PC list after requesting the PC List Inquiry API.

Note

  • This API sends an external auto-login token to the selected PC, and the actual remote execution (game access and auto-login) works in the Crossplay Launcher.
  • It is available only if the request is valid after verification through the Token Verification API.

Request URL and conditions

Category URL and Conditions
Commercial URL https://api-launcherplay.withhive.com/api/pc/remoteplay
SANDBOX URL https://sandbox-api-launcherplay.withhive.com/api/pc/remoteplay
HTTP Method POST
Data Format JSON

Request header

Request header

Field name Description Type Required
Content-Type application/json String Y
Authorization Bearer token key
(Token key returned after successful login)
String Y

Request header sample

Content-Type : application/json
Authorization : Bearer b630b963152efa1f97a8c066831222

Request body

Field name Description Type Required
appId AppID of the logged-in game String Y
playerId V4 authentication PlayerID returned after successful login String Y
did DID returned after successful login String Y
idpUserId Member ID value provided by IDP after successful login String Y
idpIndex IDP INDEX information
1: HIVE
2: Facebook
3: GOOGLE
9: APPLE
Integer Y
selected_did Among the /api/pc/list query results, the selected PC's did String Y
selected_pcName Among the /api/pc/list query results, the selected PC's pc_name String Y

Request body sample

{
    "appId" : "com.com2us.hivesdk.normal.freefull.google.global.android.common",
    "playerId" : "20000023036",
    "did" : "304166094",
    "idpUserId" : "68261324",
    "idpIndex" : 1,
    "selected_did" : "304162817",
    "selected_pcName" : "pc1"
}

Response body

Field name Description Type
code Response result code Integer
msg Response result message String

Response body sample

{
    "code" : 100,
    "msg" : "success"
}

Response code specification

code msg description
100 success Success
400 fail(Authorization parameter error) Invalid header parameter
└ Authorization
401 fail(request parameter error) Request parameter does not exist
402 fail(appId parameter error) Invalid parameter
└ appId
403 fail(playerId parameter error) Invalid parameter
└ playerId
404 fail(did parameter error) Invalid parameter
└ did
405 fail(idpUserId parameter error) Invalid parameter
└ idpUserId
406 fail(idpIndex parameter error) Invalid parameter
└ idpIndex
407 fail(selected_did parameter error) Invalid parameter
└ selected_did
408 fail(selected_pcName parameter error) Invalid parameter
└ selected_pcName
409 fail(method error) Request with invalid HTTP METHOD
500 fail(hiveCertificationKey error) Failed to retrieve the corresponding game information (Hive authentication key)
501 fail(####) During authentication server verification, #### error occurred
502 fail(current not exist or not available) Failed because the selected PC information is not currently connected
503 fail(####) When accessing Redis to check the selected PC information, #### error occurred
504 fail(more than 2 exist) If there are more than 2 connections corresponding to the selected PC information, it will fail.
└ Note: Occurs when playerId, did, and PC name are all the same.
505 fail(####) Checking the selected PC information, a #### error occurred.
506 fail(####) Acquiring information related to external automatic login tokens (enc_idp and web_idp_token), a #### error occurred.
507 fail(publish error) Failed to send external automatic login token to the selected PC.
ᄂ Note: Occurs when the number of PCs receiving the message is less than 1 (redis publish result value).
508 fail(####) When accessing Redis to send an external automatic login token to the selected PC, a #### error occurred.
509 fail(####) Sending an external automatic login token to the selected PC, a #### error occurred.
900 fail(curl error - ####) Authentication server verification in progress, curl error occurred when calling API (#### error occurred)
901 fail(api error - ####) Authentication server verification failed (#### error occurred)
902 fail(curl error - ####) Acquiring enc_idp value for external automatic login token acquisition in progress, curl error occurred when calling API (#### error occurred)
903 fail(api error - ####) Acquiring enc_idp value for external automatic login token acquisition failed (#### error occurred)
904 fail(curl error - ####) Acquiring external automatic login token (web_idp_token) in progress, curl error occurred when calling API (#### error occurred)
905 fail(api error - ####) Acquiring external automatic login token (web_idp_token) failed (#### error occurred)