Closed ppxb closed 3 years ago
Hi, yes there is an endpoint linking the Title / Game ID to the trophy sets npCommunicationId. I've not added this to the documentation yet but was planning to, in the interim look at these:
For the PS4 era API ("API v1" in this documentation):
https://gb-tpy.np.community.playstation.net/trophy/v1/apps/trophyTitles?npTitleIds=CUSA00002_00
Would return something like
{
"apps": [
{
"npTitleId": "CUSA00002_00",
"trophyTitles": [
{
"npCommunicationId": "NPWR05506_00",
"trophyTitleName": "Killzone Shadow Fall",
"trophyTitleIconUrls": " ",
"users": ""
}
]
}
]
}
For the PS5 era API ("API v2" in this documentation):
https://m.np.playstation.net/api/trophy/v1/users/me/titles/trophyTitles?npTitleIds=PPSA01461_00
But note this returns results based on the account being queried so if you haven't played the Title ID you are searching for you won't get a result. This is the only way I've come across to search for PS5 titles, and it can also find PS4 titles too (but with the same limitation of the account must have played the title).
The response will be like:
{
"titles": [
{
"npTitleId": "PPSA01461_00",
"trophyTitles": [
{
"npServiceName": "trophy2",
"npCommunicationId": "NPWR20684_00",
"trophyTitleName": "Marvel's Spider-Man: Miles Morales",
"trophyTitleIconUrl": "https://psnobj.prod.dl.playstation.net/psnobj/NPWR20684_00/baa4acc4-a8e5-42f6-ae09-3ae51b6a38fb.png",
"hasTrophyGroups": false,
"rarestTrophies": [
],
"progress": 27,
"earnedTrophies": {
"bronze": 19,
"silver": 0,
"gold": 0,
"platinum": 0
},
"definedTrophies": {
"bronze": 37,
"silver": 10,
"gold": 2,
"platinum": 1
},
"lastUpdatedDateTime": "2020-11-25T16:52:59Z"
}
]
}
]
}
As for other API endpoints, yes there are lots. The easiest way to discover them is by watching the traffic on https://my.playstation.com and you can just replicate exactly what they are doing. Another way is to decompile the Android PS App apk (you can simply unzip it), most of the endpoint URLs are stored within the these files in plain text although you will need to do some searching to find them and reverse engineering to figure out how to use them.
dude that's amazing! this is what i want. thanks for your help sincerely.
Hi,
the API for the PS5 era will only work with games that were installed and played (started) by the user. If you want to get an overview about the trophies for a game that were not installed or started by you, the result is:
{ "titles": [ { "npTitleId": "PPSA01461_00", "trophyTitles": [] } ] }
I'm also searching for an api endpoint to get the game trophies for every game title.
Thanks a lot
@MedusaLuchs85 hi man,i think you just wanna crawl some trophies list,title,desc,etc from the PS5 games. but SONY had changed there API strategy. so if the user haven't played the game,you can not get the informations. as i known,most of PS5 games' trophies via the manual way. like psnp or others. if you get a better way to get these tracks,please tell me. thanks.
@ppxb
This call can be done, without that the game must be installed or played. But only works for PS4 titles (CUSA). With PPSA (PS5 titles) won't work.
Thank you
@ppxb
This call can be done, without that the game must be installed or played. But only works for PS4 titles (CUSA). With PPSA (PS5 titles) won't work.
Thank you
of course you can get the PS4 games. as i said, "SONY had changed their API strategy".at the earlier time you can get PS5 game throungh this way.
Hopefully this will find the way back to the api.
first of all thanks for your hard working. is there have more api for PSN? like user's profile or get games trophies id [eg NPWR20188_00] via a game's id? or how to get all game's trophyset by someway else? thanks.