Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PlayStation Overlay Endpoints #26

Open
andshrew opened this issue May 17, 2024 · 6 comments
Open

PlayStation Overlay Endpoints #26

andshrew opened this issue May 17, 2024 · 6 comments
Labels
help wanted Extra attention is needed

Comments

@andshrew
Copy link
Owner

Ghost of Tsushima recently released on PC and it includes a new interface for viewing your trophies and friends list on a PC. I believe this is the first time it's been possible (in an officially supported way) since my.playstation.com was closed down.

image

Does any own the game and tried capturing the endpoints it accesses? Curious if there is anything new, or if it is just accessing similar ones to what the mobile app currently does.

https://blog.playstation.com/2024/04/17/ghost-of-tsushima-directors-cut-pc-cross-play-and-system-requirements-revealed/

https://www.theverge.com/2024/5/16/24158246/sony-playstation-pc-overlay-hands-on

@andshrew andshrew added the help wanted Extra attention is needed label May 17, 2024
@rafaelfgyn
Copy link

I'm curious too. One that changed is the new platform, PSPC for a game trophyTitlePlatform property. Would be good to update the documentation.

@andshrew
Copy link
Owner Author

andshrew commented Sep 6, 2024

To add a few details, it looks like it is using the same endpoints available in the mobile app, although the routes it uses are slightly different.

The base URL is: https://pspc.np.playstation.net/api/trophy

The paths have then had pspc added to them, for example:

https://pspc.np.playstation.net/api/trophy/v1/pspc/users/{accountId}/trophyTitles

They need different authentication scopes to actually be able to query them, which I don't have at the moment.

@Tustin
Copy link

Tustin commented Dec 21, 2024

@andshrew Just curious if you've done any more research into this? I'm currently digging into this new SDK (mostly to see if I can manually set the user's current game presence via npTitleId) and found this issue when looking up a URL i was messing with lol. I don't have any legit Sony PC games atm to test API calls with so I'm just reverse engineering the DLLs for the SDK

@andshrew
Copy link
Owner Author

Hi @Tustin

No, I've not looked at this any more. I don't have any of the games that actually have the trophies + the overlay, and none of them have been on sale for a price I'd pay just to satisfy this curiosity.

When you say you want a users presence, do you mean you want to get what it currently is or you want to try and set it to something custom?

@Tustin
Copy link

Tustin commented Dec 22, 2024

Hi @Tustin

No, I've not looked at this any more. I don't have any of the games that actually have the trophies + the overlay, and none of them have been on sale for a price I'd pay just to satisfy this curiosity.

When you say you want a users presence, do you mean you want to get what it currently is or you want to try and set it to something custom?

Gotcha, same boat for me lol I actually was looking at the Steam sale but couldn't justify it either. I'm mostly just curious to see how Sony sets the game presence using the SDK and was wondering if they would just let you set any title id as your current presence. Like for example seeing if they let you set PT as your current game or whatever.

@andshrew
Copy link
Owner Author

I ended up picking up Lego Horizon to have a look at this.

As suspected, the overlay is effectively the same as the PS app in terms of how it is requesting trophy information from PSN. There's one new endpoint which might be of interest, it seems to be a way for the game to get information about a trophy without having to know the trophy list ID:

https://pspc.np.playstation.net/api/trophy/v1/pspc/npCommunicationIds/myApp/trophies/19

The game calls this when you unlock a trophy. There's no obvious options being included within the request that might give the API hints as to what myApp is, so it's possibly something that is being set up when the authentication token is first requested.

In terms of non-trophy things, they seem to be heavily utilising the Epic Online Services SDK. Account linking, actions that are happening within the game, and online game sessions all seem to be channelled via that. So @Tustin, with your question around presence, I suspect that is all happening behind the scenes between EOS and PSN whenever the game is reporting to EOS that it's being played.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants