-1

I am supporting an app that gets player game statistics. We have for example playstation or xbox nickname and need to find bungie membershipId.

I look code - we missuse "Destiny2/SearchDestinyPlayer" API, as it requires not playstation nickname (or xbox nickname) but full bungie name including #xxxx (# id) https://bungie-net.github.io/#Destiny2.SearchDestinyPlayer

Looks like before in Destiny2 appeared cross-save function it was the same nickname and #id was not mandatory.

Could someone suggest another API that accepts platform (xbox or playstation) nickname? Also maybe suggest forum dedicated to bungie API?

PS: I searched alternative sites, for example on "https://destinytracker.com/" I am able to select platform "Playstation" and enter nickname "T-rex_on_point" - it finds bungie name Brontosaurus881#6169 and also membershipId inside URL. How it does it? What API it uses? I finally need "membershipId" id, but if I will find full bungie display name - then I am able to find "membershipId" with Destiny2/SearchDestinyPlayer" API mentioned above

1 Answers1

0

There is no "Other API". All applications uses one API which's Bungie's.

I'm assuming you're making the request using # in the URL which's not UTF-8 URL encoded.

You'll need to encode the URL specifically the # which will be encoded to %23. So instead of making the request with this name Brontosaurus881#6169 it should be like this Brontosaurus881%236169.

Also what language are you using? if Python then use urllib.parse.quote("Brontosaurus881#6169"). If not then i suggest you looking up how to encode a URL in x language.

Also if you're using Python, There's a wrapper around the API that already does that for you if you're interested and using Python.

  • Thanks for your answer very much. I understand about url enconding. I use C#, but use also helper (System.Web.HttpUtility.UrlEncode) for url encoding. But problem itself is that don't know #nr (6169 here). For example we know only xbox nickname, which is "Brontosaurus881" but user can change it, or vice versa change bungie display name. For example we know xbox nickame = "my_xbox_nick" already and need find out bungie nick name (for example it is my_renamed_bungie_nick#1357, but we don't have it) Our idea now is that we somewhere GUI shoud ask user to enter bungie display name. – Aliaksei P Oct 15 '21 at 11:13
  • I see. so what you’re trying to do is insert `name` and return `name#1234`? in this case you probably wanna use `SearchByGlobalNamePrefix` endpoint which basically searches for users by their display names only. – Fate怒 Oct 16 '21 at 13:40