JavaScript is required to use Bungie.net

Forums

originally posted in:BungieNetPlatform
9/13/2017 2:43:16 PM
3
1
Ico
Ico

Hi, I'm currently setting up a raid planner of sorts for my clan, POC'ing it via google sheets (so CORS requests being fired via that), however it seems the api endpoints I want to hit are all on 'http://www.bungie.net/d1/Platform/Destiny/' rather than the user, but I can't find any documentation that allows me to get a user's membership type from their Bungie.net ID. For example: http://www.bungie.net/Platform/User/GetBungieNetUserById/15362416/ returns my public profile info, but there's no membershiptype value, and the github link I found on another thread had them written out into a enum didn't include the Battle.net value. So if I hit: http://www.bungie.net/d1/Platform/Destiny/254/Account/15362416/Summary/ I get an invalid parameter error (which makes sense as the API docs say the {membershiptype} should be non bungie, but my profile page lists me as /254/15362416/ Halp?
English

Posting in language:

 

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

  • Try this endpoint. It will return all of the memberships the signed in user has https://www.bungie.net/Platform/User/GetMembershipsForCurrentUser/ or, if you have their bungie.net ID (like in your example above) you can use this endpoint. https://www.bungie.net/Platform/User/GetMembershipsById/{membershipId}/{membershipType}/ This will return the ID's for the game platforms they have, which is what you need for the last API in your example. I am curious if you mean to be targeting Destiny 2, those APIs are under /platform/Destiny2. You can also find an active community on GitHub: https://github.com/Bungie-net

    Posting in language:

     

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

  • 1
    Your second api example worked with my data, but my follow on: https://www.bungie.net/Platform/Destiny2/4/Profile/4611686018467302689/ Still returns error code 18, despite those values being lifted from an invocation of https://www.bungie.net/Platform/User/GetMembershipsById/15362416/254/

    Posting in language:

     

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

  • 2
    Yeah I found the destiny2 api after I made this post and basically made an xpost to the relevant github community. Will check the respective d2 ones as my quick browse lead me to the same problem.

    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