-
Notifications
You must be signed in to change notification settings - Fork 47
Description
Hi, I want to get the player avatars and custom profile pictures in the available sizes. I have tried some endpoints and have the following findings and a lost of questions:
getProfileFromUserName
await getProfileFromUserName(
{ accessToken: this.psnAuthTokens.accessToken },
'denniske1001',
);
{
"profile": {
"onlineId": "denniske1001",
"accountId": "4050105482827404713",
"avatarUrls": [
{
"size": "l",
"avatarUrl": "http://static-resource.np.community.playstation.net/avatar/3RD/UP43611208W01_5E8AE3139D24EE68D8A0_L.png"
}
],
"personalDetailSharing": "no",
...
}
}
getProfileFromAccountId
await getProfileFromAccountId(
{ accessToken: this.psnAuthTokens.accessToken },
'4050105482827404713'
);
{
"onlineId": "denniske1001",
"avatars": [
{
"size": "s",
"url": "http://static-resource.np.community.playstation.net/avatar_s/3RD/UP43611208W01_90E779569BB36140D67B_S.png"
},
{
"size": "xl",
"url": "http://static-resource.np.community.playstation.net/avatar_xl/3RD/UP43611208W01_5E8AE3139D24EE68D8A0_XL.png"
},
{
"size": "l",
"url": "http://static-resource.np.community.playstation.net/avatar/3RD/UP43611208W01_5E8AE3139D24EE68D8A0_L.png"
},
{
"size": "m",
"url": "http://static-resource.np.community.playstation.net/avatar_m/3RD/UP43611208W01_36B99D5D8BC0D8E4DF49_M.png"
}
],
...
}
makeUniversalSearch
await makeUniversalSearch(
{ accessToken: this.psnAuthTokens.accessToken },
'denniske1001',
'SocialAllAccounts'
);
{
"prefix": "denniske1001",
"domainResponses": [
{
...
"results": [
{
"id": "JGFwcjEkYXNka2ZqYWwkcnE4WXFyMlJrT05EV1haekh2QWUwLg==",
"socialMetadata": {
"accountId": "4050105482827404713",
"onlineId": "denniske1001",
"avatarUrl": "http://static-resource.np.community.playstation.net/avatar/3RD/UP43611208W01_5E8AE3139D24EE68D8A0_L.png",
"profilePicUrl": "https://image.api.playstation.com/profile/images/filestore/b5b41197/4050105482827404713/1755465281647.png",
...
},
...
}
]
}
],
...
}
Currently my favorite is makeUniversalSearch because it is the only one that returns both avatarUrl and profilePicUrl.
The profilePicUrl is btw not yet added to the return type:
| avatarUrl: string; |
- Can we make getProfileFromUserName and getProfileFromAccountId also return the
profilePicUrl?
I see there is a field personalDetail(@default,profilePictureUrls) requested but not returned:
| "isOfficiallyVerified,personalDetail(@default,profilePictureUrls),personalDetailSharing,personalDetailSharingRequestMessageFlag"; |
Is that because personalDetailSharing is false?
-
Can we make makeUniversalSearch return search results for multiple
onlineIds. Maybe a search term likedenniske1001,walter123is possible? -
Can we make makeUniversalSearch return all sizes for the avatar and profile pic? Are there even different sizes hosted for the profile pic?
-
Kind of related to 2. If I only have the
Lsize of an avatar. How can I find out the urls of the other sizes. I noticed sometimes the size suffix is uppercase and sometimes it is lowercase. Also the folder avatar_(size) is different. Is there a naming schema for different types of avatars?
I also noticed the default avatar even has inconsistent sometimes 'DefaultAvatar' and sometimes 'Defaultavatar' 👀
http://static-resource.np.community.playstation.net/avatar_s/default/DefaultAvatar_s.png
http://static-resource.np.community.playstation.net/avatar_xl/default/Defaultavatar_xl.png
http://static-resource.np.community.playstation.net/avatar/default/DefaultAvatar.png
http://static-resource.np.community.playstation.net/avatar_m/default/DefaultAvatar_m.png
http://static-resource.np.community.playstation.net/avatar_s/SCEI/I0073_s.png
http://static-resource.np.community.playstation.net/avatar_xl/SCEI/I0073_XL.png
http://static-resource.np.community.playstation.net/avatar/SCEI/I0073.png
http://static-resource.np.community.playstation.net/avatar_m/SCEI/I0073_m.png