Steamworks 文獻庫
ISiteLicenseService Interface
Provides access to services related to operating sites which are part of the Steam PC Cafe program.

GetCurrentClientConnections

GET https://api.steampowered.com/ISiteLicenseService/GetCurrentClientConnections/v1/
NameTypeRequiredDescription
keystringSteamworks Web API publisher authentication key
siteiduint64Site ID to see; zero for all sites

See current activity at one or more sites.

The response has the following structure:

NameTypeDescription
sitessee belowA list of site details
game_namessee belowMapped list of game names.

game_names has the following structure:

NameTypeDescription
iduint32ID number of entry; referenced in site info below
namestringGame name

sites has the following structure:

NameTypeDescription
siteiduint6464-bit SiteID of the site
site_namestringSite name you have assigned to the site
clientssee belowlist of active clients at the site

clients has the following structure:

NameTypeDescription
ip_addressstringIP address of client computer
hostnamestringmachine name of client computer
gamessee belowlist of active game sessions on the client computer

games has the following structure:

NameTypeDescription
iduint32ID of game in the game_names section of the response
start_timestringtime this game session started (RFC 3339 UTC format)
license_typestringsee below

license_type may have one of the following values:

ValueDescription
userThe user owns a license for the game
commercialThe user is playing via a paid commercial license applied to the site
freeThe user is playing via a free commercial license applied to the site

GetTotalPlaytime

GET https://api.steampowered.com/ISiteLicenseService/GetTotalPlaytime/v1/
NameTypeRequiredDescription
keystringSteamworks Web API publisher authentication key
start_timestringReport activity starting on or after this time. RFC 3339 UTC format.
end_timestringReport activity starting before this time. RFC 3339 UTC format.
siteiduint64Site ID to see; zero for all sites

Get total playtime amounts for all games over a period of time; for one or all sites.

The response has the following structure:

NameTypeDescription
sitessee belowA list of site details
game_namessee belowMapped list of game names.

game_names has the following structure:

NameTypeDescription
iduint32ID number of entry; referenced in site info below
namestringGame name

sites has the following structure:

NameTypeDescription
siteiduint6464-bit SiteID of the site
site_namestringSite name you have assigned to the site
gamessee belowlist of all game titles played

games has the following structure:

NameTypeDescription
iduint32ID of game in the game_names section of the response
license_typestringPlaytime is divided up for each game by the type of license used. See the GetCurrentClientConnections section above for the list.
playtime_secondsuint32total playtime for this game and license type, in seconds, for the requested period.