API Reference / Steam friends
Get cached persona states
Return the cached persona snapshots (display name, online state, and current game) for the requested Steam users. Only users already observed by the account's session are returned.
/ steam. v1. Steam/ GetPersonaStatesRequest body
application/jsonRequired
Request for the cached persona state of a set of Steam users, as observed by one account's session.
accountNamestringSteam account whose session cache to read.
steamIds?array<string>SteamIDs to look up. An id the worker has not yet observed is forwarded to Steam and omitted from the response until it is cached.
Response body
application/json
Success
personas?array<Persona>Cached persona snapshots for the subset of requested SteamIDs already observed.
Show attributes
avatarHash?stringThe user's raw Steam avatar hash. Used to derive the avatar image URL. Empty falls back to an initials placeholder.
Format"byte" base64
gameId?stringApp id of the game the user is currently playing. Zero when not in a game.
Format"int64"
gameName?stringName of the game the user is currently playing. Empty when not in a game.
observedAt?stringWhen this persona snapshot was last observed from Steam.
Format"date-time"
playerName?stringThe user's current Steam display name.
state?integerRaw Steam EPersonaState value for the user's online status.
Format"int32"
steamId?stringThe user's 64-bit SteamID.
Format"int64"
steamLevel?integerThe user's Steam level. Zero until it has been observed. Steam_level_observed_at tells the two apart.
Format"int32"
steamLevelObservedAt?stringWhen steam_level was last read from Steam. Unset until the level has been observed.
Format"date-time"
application/json
The request was malformed, such as a missing required field or an unparseable cursor.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
application/json
The request lacks a valid API key in the Authorization header.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
application/json
The API key is not allowed to perform this action on this workspace.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
application/json
The requested resource does not exist in this workspace.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
application/json
The request was rate limited. Slow down and retry later.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
application/json
An internal server error occurred.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
curl -X POST "https://api.goldmine.to/steam.v1.Steam/GetPersonaStates" \
-H "Authorization: Bearer $CSTRADER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"accountName": "trader_bot_01",
"steamIds": [
"76561198044443322",
"76561198055554433"
]
}'const res = await fetch("https://api.goldmine.to/steam.v1.Steam/GetPersonaStates", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.CSTRADER_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"accountName": "trader_bot_01",
"steamIds": [
"76561198044443322",
"76561198055554433"
]
}),
});
const data = await res.json();body := strings.NewReader(`{
"accountName": "trader_bot_01",
"steamIds": [
"76561198044443322",
"76561198055554433"
]
}`)
req, err := http.NewRequestWithContext(ctx, http.MethodPost, "https://api.goldmine.to/steam.v1.Steam/GetPersonaStates", body)
if err != nil {
return err
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("CSTRADER_API_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)import os, requests
res = requests.post(
"https://api.goldmine.to/steam.v1.Steam/GetPersonaStates",
headers={"Authorization": f"Bearer {os.environ['CSTRADER_API_KEY']}"},
json={
"accountName": "trader_bot_01",
"steamIds": [
"76561198044443322",
"76561198055554433"
]
},
)
data = res.json(){
"personas": [
{
"steamId": "76561198044443322",
"playerName": "BuyerOne",
"state": 1,
"gameId": "730",
"gameName": "Counter-Strike 2",
"observedAt": "2026-06-29T11:56:00Z"
}
]
}{
"code": "invalid_argument",
"message": "The request was malformed, such as a missing required field or an unparseable cursor."
}{
"code": "unauthenticated",
"message": "The request lacks a valid API key in the Authorization header."
}{
"code": "permission_denied",
"message": "The API key is not allowed to perform this action on this workspace."
}{
"code": "not_found",
"message": "The requested resource does not exist in this workspace."
}{
"code": "resource_exhausted",
"message": "The request was rate limited. Slow down and retry later."
}{
"code": "internal",
"message": "An internal server error occurred."
}