Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SquadExtended Knowledge Base

This repository serves as the technical documentation for the Squad server ecosystem. It covers the inner workings of Epic Online Services (EOS) integration, Steam protocol emulation, and data tracking logic used to build external tools for the game.

The goal is to provide a clear reference for developers who want to interact with the game’s backend without using the game client.

Repository Structure

The documentation is organized by the specific part of the network stack being interfaced:

Squad API (squad-api/)

Steam Protocols (steam-protocols/)

Tracking Logic (tracking-logic/)

Contributing

If you have discovered new EOS attributes, updated deployment IDs, or found more efficient ways to track server data, please submit a pull request. We aim to keep these docs updated with every major Squad patch.


EOS Authentication & Querying

To talk to the Squad master server, you have to replicate the game's authentication handshake. Squad uses a hybrid system where Steam proves who you are, but Epic Online Services (EOS) handles the actual server list.

Authentication Flow

You cannot query the EOS backend anonymously. You must exchange a Steam session ticket for an EOS access token.

  1. Log into Steam using a headless client (like steam-user).
  2. Generate an auth ticket for AppID 393380.
  3. Send a POST request to https://api.epicgames.dev/auth/v1/oauth/token.

The request body must be application/x-www-form-urlencoded and include:

  • grant_type: external_auth
  • external_auth_type: steam_session_ticket
  • external_auth_token: Your hex-encoded Steam ticket.
  • deployment_id: 5dee4062a90b42cd98fcad618b6636c2 (Standard for Squad).

You also need a Basic Auth header containing the game's hardcoded Client ID and Secret.

Server List Filtering

Once you have a Bearer token, you can hit the matchmaking filter endpoint at matchmaking/v1/{deployment_id}/filter.

Instead of a simple GET request, the API uses a JSON body with a criteria array. This allows for server-side filtering. To find populated, licensed servers, use:

{
  "criteria": [
    { "key": "attributes.PLAYERCOUNT_l", "op": "GREATER_THAN", "value": 0 },
    { "key": "attributes.LICENSEDSERVER_b", "op": "EQUAL", "value": true }
  ],
  "maxResults": 5000
}

Resolving Players and Sessions

The master server list tells you how many people are in a server, but it doesn't give you a player list. Finding who is actually playing requires a two-step lookup through the lobby and user endpoints.

Step 1: Resolve the Session

Every server has an ADVERTISEDSESSIONID_s. You take this ID and query the lobby filter: https://api.epicgames.dev/lobby/v1/{deployment_id}/lobbies/filter

Using the operator ANY_OF, you can batch multiple session IDs into one request to see the raw roster of EOS Product IDs currently in those matches.

Step 2: Resolve EOS IDs to Steam

The lobby roster only gives you EOS IDs. To get Steam64 IDs or usernames, you must hit: https://api.epicgames.dev/user/v9/product-users/search

Note that Epic limits this endpoint to 128 IDs per request. You will need to batch your lookups if you are tracking a large number of servers.


Connection Emulation

Squad usually requires a Steam Lobby to facilitate a connection. If a server is empty or the browser is failing, you can "spoof" this lobby to force the game to connect to a specific EOS session.

The Metadata Bridge

The game client relies on specific metadata keys within a Steam Lobby to know where to route the traffic. By creating a lobby via steamworks.js and injecting the following keys, the game will treat your tool as the connection source.

Essential keys for the lobby data:

  • buildid: The current game build version.
  • CONMETHOD: Set to P2P.
  • SESSIONFLAGS: Usually 227.
  • RedpointEOSRoomId_s: This must be Session: followed by the EOS Session ID of the target server.
  • RedpointEOSRoomNamespace_s: Set to Synthetic.

Once this lobby is created, you can launch the game using steam://joinlobby/393380/{lobby_id}.


Playtime & Activity Tracking

Since we only get snapshots of data when we poll the API, calculating accurate playtime requires logic to determine when a session has actually ended versus when the tracker simply missed a poll.

Session Gaps

A player is considered "active" as long as their EOS ID appears in the server roster. If the gap between two recorded events for a player exceeds X time, we treat it as a new session.

Playtime Calculation

Total time is calculated by measuring the distance between consecutive timestamps. If a player appears in only one poll before disappearing, we assign a "minimum floor" of X (was 15 in SquadBrowser) minutes to account for the time they were likely in the server between tracker cycles.

Activity Levels

To generate heatmaps or activity grids, we scale the total minutes played in a 24-hour period. We calculate the max activity day as a baseline and then map other days to a 0-4 intensity scale.

About

Protocol documentation, EoS resources, and API references.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors