xboxlive-api
xboxlive-api copied to clipboard
Getting the full list of Game Clips for a user account
Hi, I've been using this package for a year or so now and it's been great! Thanks for open-sourcing this, it's been a great help.
I noticed recently the point about the mid-2019 games not being returned by the current getPlayerGameclips
method (related to https://github.com/XboxReplay/xboxlive-api/issues/5 ?)
The suggestion to use the getPlayerGameClipsFromActivityHistory
was promising so I updated the package to v3 and switched over. However, now I'm only seeing 2 clips come back for a given user, regardless of what I put in the numItems
field.
Is there a workaround that will allow me to see all clips for a user, even for recent games?
Hey,
Unfortunately, the "activity" trick doesn't work anymore and games such as Cyberpunk 2077 won't be returned.
The only viable workaround is the use "mediahub.xboxlive.com" domain (which is used by mobile / desktop apps) but it requires a XSTSToken created from UserToken
, TitleToken
and DeviceToken
combination.
Right now, this library can not handle it by itself.
Good news, the upcoming update of XboxReplay.net and its API (v2) will. Another good news, you'll be able to use it for free.
I'm leaving this issue opened and I'll communicate about the update in a few weeks.
A new branch (4.0.0) has been created.
- https://github.com/XboxReplay/xboxlive-api/tree/4.0.0
To overcome this issue, this library will expose additional methods to call the upcoming v2 XboxReplay API ; which is able to retrieve all missing content.
Once the update is live, the library will be updated.
Ah, excellent. I'll give this a go when I get a bit of time.
So this will mean we're hitting your back end service, rather than going directly to MS, is that right?
If you must, yes :)
With the requirements for the device specific headers etc. does that rule out decentralising it in the way it was before? It's handy being able to go straight to MS since it won't add extra load on intermediaries
Everything is cached on XR side (max TTL of 15 minutes) and pulled from the mediahub endpoint with a valid XSTS token (signed + title / device combination).
If you really want to exclusively use XSAPI endpoints (Xbox Services API), upcoming endpoints will allow you to create your own signed XSTS token which grants the same access as XboxReplay to this service.
Ah, that's pretty comprehensive. Good to know both options exist. I look forward to giving this a go!
Major update: As recently specified on @XboxReplay twitter account, due to an internal privacy update on XBL APIs, there's no way anymore to retrieve recent users' screenshots (except for ESRB:E (Everyone) rated games such as Minecraft).
The only way to fetch them is to ask the user to authenticate itself on XboxReplay.net (for instance) and use its token to fetch its content.
This process also requires "signed tokens" but as I managed to reverse the signature algorithm, this is not an issue (already used on halodotapi.com projects).
Note: Current XboxReplay API is able to fetch all recent clips ;)
Hi there,
I am trying to use this library to get clips but I am seeing next to nothing when using my gamertags. This issue seems relevant, but I am confused as to the status of things and the solutions to the issues.
It sounds like the 4.0.0 branch might work? Or is there more to it?
I tried 4.0.0
but I get a 404 error when trying to fetch clips via getPlayerGameClips
, which uses https://mediahub.xboxlive.com/clips/search
. Some internet searching led me nowhere with regard to that.
The documentation for 4.0.0
mentions an XboxReplay wrapper, which sounds like it uses xboxreplay.net as a middle man, but it requires a token, and I don't see anything on the site about signing up and getting a token.
EDIT: Found more about it here: https://github.com/XboxReplay/xboxreplay-public-api
I realize 4.0.0 is WIP, but any help is appreciated! Would be nice not to relay through other services. Cheers!
Hi, is there a merge between the branch 4.0 and the main branch planned ?
Hey there, just wanted to add in my interest for an update to this repo and the 4.0 branch. I pulled down the branch and tried using getPlayerGameClips but get 404s when trying to hit https://mediahub.xboxlive.com/clips/search
. Would love an update on this so we could directly make calls to the MS service!
Hey @RyanEwen @xenursXX @Develonaut, sorry for the late reply.
Right now I do not have bandwidth to continue my work on the 4.0.0 and the new XboxReplay API due to my major implication on HaloDotAPI (see: https://autocode.com/community/announcements/halodotapi-is-joining-autocode/)
Once everything is done I may be able to finish it :) Cheers!
@RyanEwen @Develonaut the right endpoint for mediahub is https://mediahub.xboxlive.com/gameclips/search
. I request like this should work:
curl --location --request POST 'https://mediahub.xboxlive.com/gameclips/search' \
--header 'Authorization: XBL3.0 x=userhash;xsts_token \
--header 'Content-Type: application/json' \
--data-raw '{"query": "OwnerXuid eq xuid"}'
However, using this endpoint, I'm still missing some clips for specific games, like FIFA and Halo Infinite. If you guys find a solution for that, please share :)
@RyanEwen @Develonaut the right endpoint for mediahub is
https://mediahub.xboxlive.com/gameclips/search
. I request like this should work:curl --location --request POST 'https://mediahub.xboxlive.com/gameclips/search' \ --header 'Authorization: XBL3.0 x=userhash;xsts_token \ --header 'Content-Type: application/json' \ --data-raw '{"query": "OwnerXuid eq xuid"}'
However, using this endpoint, I'm still missing some clips for specific games, like FIFA and Halo Infinite. If you guys find a solution for that, please share :)
@KarineValenca were you able to find a way to grab clips for Halo Infinite? I'm having the same issue.
@ferhanmm no luck yet :/