Reputation: 33
I am using this url
https://steamcommunity.com/profiles/[STEAMID]/inventory/json/730/2/
then decoding it with json_decode - as it is it works fine, until I refresh my page 2 times, then it gets the error out as it says:
failed to open stream: HTTP request failed! HTTP/1.0 429 Too Many Requests
Upvotes: 3
Views: 3293
Reputation: 1
While my response is late, I wanted to provide you with some information. In addition to services like www.steamwebapi.com (free) and steamapis.com (paid), you can also explore the option of setting up your own proxy to access Steam's inventory. However, it's important to note that Steam has implemented restrictions on inventory access since 12/22, which impact the effectiveness of these solutions.
Upvotes: 0
Reputation: 8162
The cause are too many of your requests in too short a time.
The Steam servers accept 200 request in five minutes or on average one request every 1.5 seconds. You need to do rate limiting by throttling the number of requests you send in order to prevent this error.
Upvotes: 1
Reputation: 881
The answer is right there.
Too many requests.
There is a request limit and you are hitting it.
Upvotes: -1