JavaScript is required to use Bungie.net

Service Alert
Destiny 2 will be temporarily offline tomorrow for scheduled maintenance. Please stay tuned to @BungieHelp for updates.

Forums

originally posted in:BungieNetPlatform
Edited by A1mle55: 5/17/2015 12:31:46 AM
3

ErrorCode:99 Please sign-in to continue.

I know this isn't the first time this question has been asked but I have been banging my head against my keyboard for the past 2 days and would really appreciate some help. I'm trying to build a simple application but i'm stuck on the authentication process. I've managed to get the bungled, bungledid and bungledatk cookies but all requests I have send return the exact same error. [spoiler]{"ErrorCode":99,"ThrottleSeconds":0,"ErrorStatus":"WebAuthRequired","Message":"Please sign-in to continue.","MessageData":{}}[/spoiler] This is the code I have been using to send my request: [spoiler] function CreateRequest (cookies, url, method, authenticate, message){ if(typeof message !== "string") message = null; var dfrrd = $.Deferred (), xhr = new XMLHttpRequest(); xhr.open(method, url, true); xhr.timeout = 5000; xhr.onreadystatechange = function(){ if(xhr.readyState === 4) if (xhr.status === 200) dfrrd.resolve(xhr.responseText); else dfrrd.reject({Reason: "Network error: " + xhr.status }); }; if(authenticate){ console.log ('I am being authenticated') ; xhr.withCredentials = true; xhr.setRequestHeader("x-csrf", cookies[2].value); } if(message !== null) xhr.send(message); else xhr.send(); return dfrrd.promise () ; }; [/spoiler] and these are the values I've been feeding the function: [spoiler](cookies, 'https://www.bungie.net/Platform/User/GetBungieNetUser/', 'GET', true)[/spoiler] In theory it should work. Maybe I have been staring at my screen for too long and just fail to see the mistake.... Edit: I work with Node-Webkit
English

Posting in language:

 

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

View Entire Topic
  • You could use my API tester for this: http://www.rickdeman.nl/Destiny/apitest.php It does not log anything, you can find the source here: http://pastebin.com/RJc3jtDw

    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