Open BadCoder1337 opened 2 years ago
https://public-ubiservices.ubi.com/v3/profiles?platformType=psn&namesOnPlatform=AreYouAhueliTut
Returns:
{
"profiles": [
{
"profileId": "d3dde2ca-7c92-468e-89b4-9dab253225ce",
"userId": "c4fdcaf8-3282-45ec-826b-8f91b4dd1794",
"platformType": "psn",
"idOnPlatform": "2072355385337540186",
"nameOnPlatform": "AreYouAhueliTut"
}
]
}
For second case it does indeed returns null
for userId
I took the PSN example from my Postman collection, it is outdated. But null is still possible, and it should be represented in types.
Is there a reason we use userId
instead of profileId
while building avatar url? Can't remember.
Ubisoft doesn't proxy platform avatar behind profileId
URL, there's a blank avatar. All trackers (e.g. R6DB) display userId
avatar for console profiles.
I went down a rabbit hole, even more lost now. How does r6tracker displays pfp for this user: https://r6.tracker.network/profile/xbox/Mono%20wins
Looks like they're using some Xbox API to retrieve platform avatar by idOnPlatform
. But this is not r6api.js
business, IMHO. Also, I sure there's no similar API for PSN.
In rare cases
userId
isnull
. I'm usure why but it seems to represent a linked account which doesn't started a game. Raw API response tonameOnPlatform
search:Library response to
idOnPlatform
search: