JavaScript is required to use Bungie.net

OffTopic

Surf a Flood of random discussion.
originally posted in:BungieNetPlatform
9/2/2014 11:14:33 AM
2

API Proxy

Having trouble with JavaScript requests and CORS in browsers? Fear no more, simply replace http://www.bungie.net/platform with http://bungie-platform.herokuapp.com/proxy. The API Proxy works on node and simply proxies your request to the bungie.net/platform while removing the CORS headers. It also forwards cookies (hooray!). [b]API Explorer[/b] If you want to simply look what is available for API Endpoints you don't have to write your own client. I tried parsing the endpoints file and with a bit of code the API Explorer was alive: http://bungie-platform.herokuapp.com/api/explorer. I still need to map out some things so one knows what to actually put into the generated fields BUT right now I think it already works pretty well. Cheers and have fun o/ Sargo

Posting in language:

 

Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

  • Hey, I was wondering if you could give me a hand with this. I'm trying to use the herokuapp to overcome the CORS issue, but I'm getting the following message: [quote]XMLHttpRequest cannot load http://bungie-platform.herokuapp.com/proxy/User/SearchUsers/?q=FraserBaws. Request header field X-API-Key is not allowed by Access-Control-Allow-Headers in preflight response.[/quote] I'm using the following jQuery AJAX call: [quote] $.ajax({ type: 'GET', beforeSend: function (request) { request.setRequestHeader("X-API-Key", apiKey); }, url: 'http://bungie-platform.herokuapp.com/proxy/User/SearchUsers/?q=FraserBaws', success: function( data ) { response(data.Response); } });[/quote] Any idea why I may be getting this message? Any help is greatly appreciated.

    Posting in language:

     

    Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

    2 Replies
    • Hey Sargo, Thanks for your API documentation. I've a few questions, I can get user info with a gamertag/psn, with that info I can get membershipid, charactersid. But on http://bungie-platform.herokuapp.com/api/ I see parameter letters everywhere which I dont know where to replace them with. I noticed d should be console, and e gamertag/psn. Do you have more info about the parameters? I'm working on a call that can check players K/D ratio, do you know have any idea which call I'll need for that? Thanks in advance. xgerhard

      Posting in language:

       

      Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

    You are not allowed to view this content.
    ;
    preload icon
    preload icon
    preload icon