Wszystkie dyskusje > Fora Steam > Help and Tips > Szczegóły wątku
Chongo 30 kwietnia 2020 o 12:16
Steam API IPlayerService/GetOwnedGames
I've been working with the Steam API and a view of the endpoints.

Thus far, I've successfully retrieved data via GetPlayerSummaries and RecentlyPlayedGames. Both return what I need with no issue.

However, I'm running into an issue when trying to make a call to GetOwnedGames. I receive an empty object when checking the returned JSON when using my key and user ID. Yet if I use my key and another user's ID with a public profile, I receive all of the data provided by GetOwnedGames.

Is there a reason that I can't retrieve a list of my own games?

Note: I've checked my privacy preferences and all settings are set to public.
< >
Wyświetlanie 1-5 z 5 komentarzy
MalikQayum 30 kwietnia 2020 o 14:57 
I am able to get your data so that would mean you have to be doing something wrong.
If you could possibly paste your code here and i could take a look at it.

remove your api key, if you chose to do so.

{ "response": { "game_count": 160, "games": [ { "appid": 10, "playtime_forever": 243, "playtime_windows_forever": 0, "playtime_mac_forever": 0, "playtime_linux_forever": 0 }, { "appid": 80, "playtime_forever": 494, "playtime_windows_forever": 0, "playtime_mac_forever": 0, "playtime_linux_forever": 0 }.............
wuddih 30 kwietnia 2020 o 15:17 
something is odd with your profile though.

your games list is not accessible but recent activity is.
that should not be possible.

edit: and as soon as i write that, your games display. did you change something in your privacy settings?
Ostatnio edytowany przez: wuddih; 30 kwietnia 2020 o 15:18
Chongo 30 kwietnia 2020 o 16:00 
Hey folks,

Just seeing this. I haven't changed anything through Steam. But I am now seeing the list returned, at least in the browser. Maybe the API was/is having issues?

Here's an example call (Working with Next.js):

require('dotenv').config(); const axios = require('axios'); exports.handler = async () => ( axios.get(`http://api.steampowered.com/IPlayerService/GetOwnedGames/v0001/?key=${process.env.STEAM_KEY}&steamid=${process.env.STEAM_ID}`) .then(res => ({ statusCode: 200, body: JSON.stringify(res.data.response), headers: { 'Content-Type': 'text/json', }, })) .catch(error => ({ statusCode: 422, body: String(error), })) );
Chongo 1 maja 2020 o 6:49 
Well, the GetOwnedGames endpoint worked for awhile this morning and is now back down for me. I'm receiving an empty object again.

Am I reaching a call limit?
wuddih 1 maja 2020 o 7:06 
code looks ok as it also looks like some code snippet template.

api limit is 100k per rolling 24 hours.
< >
Wyświetlanie 1-5 z 5 komentarzy
Na stronę: 1530 50

Wszystkie dyskusje > Fora Steam > Help and Tips > Szczegóły wątku
Data napisania: 30 kwietnia 2020 o 12:16
Posty: 5