JavaScript is required to use Bungie.net

Forums

originally posted in:BungieNetPlatform
originally posted in: API Proxy
12/30/2015 1:12:44 PM
2
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.
English

Posting in language:

 

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

  • Hey Fraser, I don't think that heroku proxy app takes API key as a param. It was made before api keys were required so it's possible it was never updated. I can help you if you're running an angular app

    Posting in language:

     

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

  • Ahh, I see. Thanks for the info. I initially wanted to create my app purely in javascript, but to overcome the CORS issue I've decided to just use some C# code. Angular looks really cool though, will definitely be checking it out soon. Thanks!

    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