xbox-webapi-python icon indicating copy to clipboard operation
xbox-webapi-python copied to clipboard

Which api can get game play time?

Open Asteroidxx opened this issue 3 years ago • 2 comments

I had get user's game list form request "https://titlehub.xboxlive.com:443/users/xuid(xuid)/titles/titlehistory/decoration/achievement,image,scid" and get many detail, but I can't found play duration in each game. How can i get it?

Please,Appreciate!

Asteroidxx avatar Nov 24 '22 14:11 Asteroidxx

I had get user's game list form request "https://titlehub.xboxlive.com:443/users/xuid(xuid)/titles/titlehistory/decoration/achievement,image,scid" and get many detail, but I can't found play duration in each game. How can i get it?

Please,Appreciate!

Hello brother, have you found this API? I also need it very much. If you find it, please let me know. Thank you very much!!!

JeahWan avatar Nov 29 '23 16:11 JeahWan

To get playtime you need to do a POST request to https://userstats.xboxlive.com/batch Headers:

Authorization: XBL3.0 Token
X-Xbl-Contract-Version: 2

Content: {"arrangebyfield":"xuid","xuids":["XUID_HERE"],"stats":[{"name":"MinutesPlayed","titleId":"TITLEID_1"},{"name":"MinutesPlayed","titleId":"TITLEID_2"}]}

stelemanuele77 avatar Aug 16 '24 12:08 stelemanuele77