Jump to content

Using the CSGO Marketplace API to fetch data via JSONP request fails for me


Gambelix
 Share

Recommended Posts

I'm trying to fetch data from the backpack.tf Market API so I wrote this code (in Javascript (JQuery preloaded), executed through a Chrome extension):



$.ajax({
url: "https://backpack.tf/api/IGetMarketPrices/v1",
dataType: "jsonp",
type: "GET",
data: {
format: 'jsonp',
key: 'XXX',
appid: 730,
callback: "?"
},
success: function( response ) {
console.log( response );
}
});

However Chrome throws an error: "Uncaught ReferenceError: jQuery31102767713451557141_1486009880600 is not defined". For me, that seems like JSONP is not supported, but from the documentation, it should be. I really hope this is just me doing a stupid mistake, so it would be nice if someone could tell me which. 


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...