View Single Post
Author Message
tuty
Veteran Member
Join Date: Jul 2008
Location: UK
Old 12-05-2016 , 08:17   Help with Steam API returning json
Reply With Quote #1

Hello, it's been a while. I have a project at university where i am trying to retrieve game price with steam api in a json return. Thing it, i get this error:

XMLHttpRequest cannot load https://store.steampowered.com/api/a...price_overview. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'mywebsite.com' is therefore not allowed access.


and the code is something like this.

PHP Code:
var SteamStoreURL "https://store.steampowered.com/api/appdetails/?appids=" GameID "&cc=gb&filters=price_overview";


$.
getJSON(SteamStoreURL, function(data)
{
    var 
URLString JSON.parse(data);

    
console.log(URLString);
}); 
I really cannot get it to work. I am not a super web developer or something like that, but any help would be appreciated. I just want to retrieve the game current price using json javascript.
__________________
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty