originally posted in:BungieNetPlatform
View Entire Topic
I'm currently trying to figure out manual authentication via the Mac OSX SDK. No matter what I do, the JSON response always returns an error of "WebAuthRequired" and "Please sign-in to continue". I've followed the instructions in the API introduction post but am getting nowhere.
Here is what I have so far:
//<character ID> is replaced with one of my own character IDs.
//the vendor hash for gunsmith is outlined on a separate wiki
NSURL *url = [NSURL URLWithString:@"http://www.bungie.net/platform/Destiny/1/MyAccount/Character/<characterID>/Vendor/570929315<gunsmith>/"];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
[request setHTTPMethod:@"GET"];
[request setValue:@"www.bungie.net" forHTTPHeaderField:@"Host"];
[request setValue:@"keep-alive" forHTTPHeaderField:@"Connection"];
[request setValue:@"<my api key>" forHTTPHeaderField:@"X-API-Key"];
[request setValue:@"bungledid=<bungledid cookie value>; bungled=<bungled cookie value>" forHTTPHeaderField:@"Cookie"];
//both cookies are obtained by inspecting cookies on a private browsing session
[NSURLConnection connectionWithRequest:request delegate:self];
After retrieving the contents of the request it's always the error message.
Please help!
English
-
If you still need help with this email me at szhlopp@gmail.com and I can show you. I've written an almost complete framework that authenticates via Live credentials (your xbox account).