So I'm trying to get a player's CSGO inventory using Valve's API, but I can't get it to work since it's giving me the no 'access-control-allow-origin' header is present on the requested resource.
error, so I tried using jsonp but I'm not sure if it supports it. So I was wondering how I would get someone's inventory? A ton of other sites can get it but I don't know what I need to do. Any help is appreciated :)
I'm using javascript/jQuery if that helps at all
You cant get access to the inventory via jsonp because steam disallows CORS requests (they need to set the headers).
Since steam is not providing an option to enable this you need to proxy the inventory request through your own server.
So you need to write your own REST API Proxy to achieve this:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.