Извлечение инвентаризации для SteamID: 7656119xxxx
Пробуйте новый API: https://steamcommunity.com/inventory/xxxxxxxxxx/730/2? class = "Snippet">
Код: Выделить всё
app.get('/inventory', async (req, res) => {
if (!req.user) return res.status(401).json({ error: 'Not logged in' });
const steamid = String(req.user._json?.steamid || req.user.id);
const url = `https://steamcommunity.com/inventory/${steamid}/730/2?l=english&count=5000`;
const response = await fetch(url, {
headers: { 'User-Agent': 'Mozilla/5.0' }
});
if (!response.ok) {
return res.status(500).json({ error: `Steam returned status ${response.status}` });
}
const json = await response.json();
// …process json…
});Подробнее здесь: https://stackoverflow.com/questions/797 ... rom-backen
Мобильная версия