get the accountID of the current logged in user
Salim-Alsaeh opened this issue · 1 comments
Salim-Alsaeh commented
I've read in the documentation that if I want to search for your own username, I should use "me" instead of the standard account ID value. However, the results are psn usernames with the value "me" in them, but not the currently logged-in account.
The two methods I tried are:
(await getProfileFromAccountId(auth, 'me')).onlineId
makeUniversalSearch(auth, "me")
and then checking the first result
How can I retrieve the logged-in account's account id or username please? thanks!
wescopeland commented
Hi! This may not be doable with the current set of functions that psn-api offers.
As a workaround, I recommend searching for the accountId using a new account that is only used by your psn-api implementation. This is generally a good idea anyway, as you wouldn't want Sony rate limiting or throttling your personal account.