originally posted in:BungieNetPlatform
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
-
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
-
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/
-
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.