Bungie-net / api

Resources for the Bungie.net API
Other
1.22k stars 92 forks source link

Endpoint SearchByGlobalNamePost - UserCannotResolveCentralAccount #1777

Closed cweinwurm closed 1 year ago

cweinwurm commented 1 year ago

Hey,

I am currently working on an app and would like to lookup various ids by provided displayName entered by the user for further requests.

Therefor I would like to use the endpoint User.SearchByGlobalNamePost. I am calling it as POST https://www.bungie.net/Platform/User/Search/GlobalName/0/ with body JSON param {"displayNamePrefix" : "xyz"} and API header via Postman. As response I get a "method not allowed" via cloud flare. What am I missing? Or is oauth required for this endpoint call?

Thanks.

cweinwurm commented 1 year ago

Ok finally I get some "response" but its an error:

{ "ErrorCode": 217, "ThrottleSeconds": 0, "ErrorStatus": "UserCannotResolveCentralAccount", "Message": "We couldn't find the account you're looking for. The account may not exist, or we may be experiencing technical difficulties.", "MessageData": {} }

This endpoint should provide some kind of lookup for displayNames in Destiny 2 right? Like if my displayName in d2 is "tomRiddle" and I would enter "tomRi" and trigger the request it should provide an array of possible display names as response right?

cweinwurm commented 1 year ago

Even if I try this endpoint with my own "full" display name I get the error mentioned above. Could be related to https://github.com/Bungie-net/api/issues/1559

My goal would be to implement some autocompletion so when the user starts typing an displayName, I would like to provide matching displayNames.

As far as I understand the documentation for this endpoint, it should exactly provide this functionality right? Given the prefix of a global display name, returns all users who share that name.