Hello,

I don't know if steamgifts is the best place to talk this. But I have already tried in the steam forums and reddit without very success , and sometimes I have found posts in SG (by google) talking about Steam APIs and such.

I'm having issues getting ownedgames for some users.
I know about the last changes in privacy settings, but looks like there are some inconsistencies with it.

For example, user A, which has settings by default (public profile, with private library), when i perform the getownedgames api i can read them. Example:

http://api.steampowered.com/IPlayerService/GetOwnedGames/v0001/?key=xxxxx&steamid=76561198058681068&include_played_free_games=1&include_appinfo=1&format=json

User B, which has the same default settings (you can check in their profile if you take the steamid, returns an empty object:

http://api.steampowered.com/IPlayerService/GetOwnedGames/v0001/?key=xxxxxx&steamid=76561198056800313&include_played_free_games=1&include_appinfo=1&format=json

Any ideas in what can this be?
I have tried to get privacy status from user data and i'm out of ideas.

Thanks

5 years ago

Comment has been collapsed.

User B, which has the same default settings

I just checked their profile, games are not public

5 years ago
Permalink

Comment has been collapsed.

ah, I didn't see that's the case for both

5 years ago
Permalink

Comment has been collapsed.

I get an empty response for the first user, so maybe it's because they are on your friendlist ?

5 years ago
Permalink

Comment has been collapsed.

Hey, thanks for answering.
In fact, the first one is in my friends list, but that is happening with other users as well.

What i'm going to do is remove that dude from my friends list and make a couple of tests.
Thanks for the tip

5 years ago
Permalink

Comment has been collapsed.

I don't think having those users as friends will change anything, since the API key doesn't use your account to access data, atleast not that I'd ever heard of that.

If this however is the case, please let me know in a response :)

5 years ago
Permalink

Comment has been collapsed.

I wouldn't have thought either but since they're bound to your Steam account it's not impossible.
I just tried with an account on my friend list with a friends-only profile (not just game details, fully friend-only) and I could get a response with the game details.
Here's the ID if you want to try : 76561198071371771

5 years ago
Permalink

Comment has been collapsed.

Interesting, this creates new possibilities!

5 years ago
Permalink

Comment has been collapsed.

Well, unfortunatelly this is the case.
The API key is bound to my account, and that guy had profile set to friends only.

I though that when having the profile to friends was something that didn't affect when you are specifically doing a login with steam. But the test proved that when i deleted that dude from my friends list, i received an empty response as well.

5 years ago
Permalink

Comment has been collapsed.

This is really interesting, though it should be an optional behaviour. I'd love to have a parameter that lets me see every user completely neutral, as if we were no friends. I guess right now I can get that result by creating an API key on a Steam account that doesn't have any friends.

5 years ago
Permalink

Comment has been collapsed.

exactly.
Also, big websites that scrap a lot of data should have multiple api keys.
SG for example, syncs the accounts of every user every night, i don't know how they do it , but one api key accepts 50 calls every five minutes i think.

My site is not that big yet though :P

5 years ago
Permalink

Comment has been collapsed.

It's 100,000 requests per day actually, though they can approve more requests (but I guess those are limited to partnered game developers and such). You could use multiple API keys and a rotating proxy to perform such a high number of requests.

5 years ago
Permalink

Comment has been collapsed.

You can use the GetPlayerSummaries endpoint, this returns the parameter communityvisibilitystate. It will be 3 when it's a public profile. You can get the summaries for up to 100 Steam users with one call, providing less overhead.
https://developer.valvesoftware.com/wiki/Steam_Web_API#GetPlayerSummaries_.28v0002.29

When you find the profile is public, you can call GetOwnedGames. As you found out, when the game details are private, you get an empty response. When it's public, but the total playtimes are private, the total_playtime for all games will be set to 0.

Ideally Steam should provide this library status in the GetPlayerSummaries API call result, but they don't sadly..

5 years ago
Permalink

Comment has been collapsed.

I want to thank you. That was the response.
Thanks a lot

5 years ago
Permalink

Comment has been collapsed.

Sign in through Steam to add a comment.