Felix
Felix

Reputation: 148

How to retrieve current playing game without logging in to Steam

I've been messing around with some simplified Steam API's but I don't get much. I'd like some help to retrieve the status of a user without the user logging in (which is the only way I figured out how to do it).

Upvotes: 1

Views: 3484

Answers (1)

Andy
Andy

Reputation: 50600

I am making an assumption that you are looking for a user's online/offline status. To get this, you'd use this API call:

http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=APIKEY&steamids=IDS YOU ARE LOOKING AT

Documentation here: GetPlayerSummaries

Regardless of the user's privacy setting, you will find that personastate contains the user's status. From the documentation

The user's current status. 0 - Offline, 1 - Online, 2 - Busy, 3 - Away, 4 - Snooze, 5 - looking to trade, 6 - looking to play. If the player's profile is private, this will always be "0", except is the user has set his status to looking to trade or looking to play, because a bug makes those status appear even if the profile is private.

The documentation also shows other fields that are available on public/private profiles and may be worth looking at.

Upvotes: 2

Related Questions