Skip to main content

Launch tokens

Launch tokens are temporary credentials used to validate the technical connection between the launcher and the game during startup. Their purpose is to allow the game to confirm that it was launched through Launcher Forge and that the token supplied by the launcher is still valid.
A launch token works as a temporary startup pass between the launcher and the game runtime.

What a launch token validates

The validation flow connects four components:
  • The desktop launcher.
  • The Launcher Forge backend.
  • The game executable.
  • The validation integration installed in the game.
It does not replace:
  • End-user registration.
  • Launcher sign-in.
  • Game ownership.
  • CD key redemption.
  • The player’s library.
Those processes belong to other modules. The launch token is used specifically to validate startup between the launcher and the game.

General flow

Architecture diagram

Process summary

1. The launcher requests the token

When the player selects Play, the launcher sends a request to the backend to generate a temporary token for the selected game.

Generation endpoint

The :gameId parameter identifies the game that will be started. Conceptual example:
The launcher performs this request using its internal session and context.
This endpoint is part of the launcher’s internal flow. The game client should not call it manually to generate launch tokens.

2. The backend generates a temporary token

The backend creates a token with a short lifetime. In the current flow, the approximate TTL is:
The limited lifetime reduces the possibility of reusing an old token outside the intended launch flow. The launcher should start the game immediately after receiving it.

3. The launcher starts the game

After receiving the token, the launcher starts the game and appends the token to the process arguments. Startup contract:
Conceptual example:
Never expose the real token in public screenshots, player-facing messages, or production logs.

4. The game reads the argument

During startup, the game integration must look for:
The game must:
  1. Read the process arguments.
  2. Detect --launchToken=....
  3. Extract the token value.
  4. Confirm that it is not empty.
  5. Send it to the validation endpoint.
The presence of the argument does not mean the token is valid. Validation only succeeds after the backend confirms it.

5. The game sends the token to the backend

The game sends the token in the body of a POST request.

Request body

The exact validation endpoint depends on the current backend and engine integration configuration. The expected request contract is:

6. Successful response

When validation succeeds, the backend returns the validation status and the initial validated data.

Response contract

Available fields

The connection is considered validated when the request succeeds and data.valid is true.

7. Invalid or expired token

When the token is invalid, has expired, or is used outside the expected flow, the backend returns 401 Unauthorized.
The game must treat this response as an unvalidated launch. When validation fails, the game should:
  • Stop the flow that requires a validated launcher connection.
  • Display a short and understandable message.
  • Return to a safe screen or close the protected flow.
  • Record only the technical information needed for diagnostics.
  • Never print the complete token.
Example player-facing message:
Do not display:
  • The token.
  • Authorization headers.
  • Private URLs.
  • Complete internal backend responses.
  • Backend stack traces.

Integration states

The integration should distinguish at least these states:

Game-side logic

Security best practices

Treat it as a temporary credential

Even with a short lifetime, the launch token must be protected while it exists. Do not store it in:
  • Configuration files.
  • Local databases.
  • Player preferences.
  • Production logs.
  • Screenshots.
  • Error messages.

Do not trust the argument alone

A user can manually start an executable with a fabricated argument. The game must send the value to the backend and wait for a valid response.

Do not reuse tokens

The game should not store the token for future launches. Each launch from Launcher Forge must generate a new token.

Handle expiration

The launcher should start the game immediately after generating the token. The game should begin validation as early as possible during initialization.

Handle network failures

A connection failure must never be treated as a successful validation. Distinguish between:
  • Invalid token.
  • Expired token.
  • Backend unavailable.
  • Request timeout.
  • Unexpected response.

Engine integrations

The general logic is the same for every engine:
  1. Read --launchToken.
  2. Extract the token.
  3. Send { token } to the backend.
  4. Check the HTTP status.
  5. Confirm success.
  6. Confirm data.valid.
  7. Continue or reject the protected flow.

Unreal Engine

Configure the plugin, read the token during startup, and validate the launcher connection from Unreal Engine.

Unity

Configure the package, read the process arguments, and validate the launcher connection from Unity.

Validation checklist

Before publishing a distributable build, verify:
  • The game reads --launchToken.
  • The token is extracted without extra characters.
  • The request body uses { "token": "..." }.
  • The backend returns the expected contract.
  • data.valid must be true.
  • 401 responses are handled correctly.
  • Network errors are not treated as success.
  • The token does not appear in production logs.
  • The game displays a controlled message when validation fails.
  • Validation is tested by launching the game from Launcher Forge.
The integration is ready when the game correctly distinguishes a validated launch, an invalid token, a missing token, and a connection error.

Next step

Select the integration for your game engine:

Integrate with Unreal Engine

Implement the launch-token flow with the Launcher Forge plugin for Unreal Engine.

Integrate with Unity

Implement the launch-token flow with the Launcher Forge package for Unity.