JavaScript is required to use Bungie.net

Forums

originally posted in:BungieNetPlatform
3/5/2016 2:54:58 AM
2
Here's a snippet of how I do it, using the requests module (stolen from the Wikia, but I can't recall what particular page it was on): r = requests.get(manifest_url, headers=HEADERS) manifest = r.json() manifest_url being 'https://www.bungie.net/Platform/Destiny/Manifest' and HEADERS being {"X-API-KEY":'insertyourapikeyhere'} Hope that helps!
English

Posting in language:

 

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

  • Thank you so much, it looks very similar to mine. I have that part working. the API call is no problem till I need the XBL cookies and that whole redirect mess. I should edit the OP to make it clear what the **** I was actually asking. Teach me to multitask and post. BTW, here is how I do that part to make it much more modular: (note api key is in a local JSON that I parse for config variables but you can just as easily do it here to replace apiKey (as if you didn't know that)) # BEGIN AUTHENTICATION apiheaders = {"X-API-Key": apiKey} # END AUTHENTICATION def getAccount (memberID): url = "https://www.bungie.net/platform/destiny/1/Account/"+memberID r = requests.get(url, headers=apiheaders) account = r.json() return account

    Posting in language:

     

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

  • Ah, yeah, I haven't poked around with authenticated users with cookies or anything like that yet! Hope that others can point you in a better direction!

    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