andshrew / PlayStation-Trophies

Sony has an API for retrieving details of the trophies an account has earned, but there is no public documentation for using it. This is an attempt at documenting the API by capturing the requests made by the https://my.playstation.com web site.
MIT License
104 stars 4 forks source link

Documentation of the new PSN API? #1

Closed Ragowit closed 2 years ago

Ragowit commented 3 years ago

First, truly great and detailed documentation of the API used by https://my.playstation.com

With the release of the new PSN app so is there a new base URL to access information with support for PS5 titles and other updated information as well, https://m.np.playstation.net/api/

So I simply wonder if you will take on the task to document this as well? At the time of this writing so does https://my.playstation.com still uses the old API and can't display PS5 titles.

andshrew commented 3 years ago

Hi @Ragowit, thanks for the feedback I appreciate that.

I'm interested in looking in to the new APIs but it might have to wait until they update https://my.playstation.com to use them as I have not found a way to be able to successfully capture the traffic of the app to see the calls it's making. It seems to communicate entirely over HTTPS and even when using a proxy so that I can do SSL inspection the app doesn't seem to use it properly.

Ragowit commented 3 years ago

There was a comment here that might help you, if you want to investigate further: https://github.com/Tustin/psn-php/issues/146#issuecomment-727098493

Otherwise it might be easiest to wait until they update the site, as you said.

andshrew commented 3 years ago

Just to let you know I've uploaded some initial documentation for the new API now.

Thanks for that link, it helped in understanding how to authenticate to the new API.

Ragowit commented 3 years ago

Looking good! Thanks for the update. I have found a "reward" attribute for trophies, and I have so far only encountered it with the game "Destruction AllStars". Easy to miss since its hard to find.

andshrew commented 3 years ago

Nice spot on that, I'll add it in over the next few days.