Repository navigation
Description
Hello,
please add a button so iwe can filter all games which we own and are playable...
After some time buying stuff and having lots of games its not that simple to see them so i can properly choose what to play.
this can be achieved by:
POST to https://collections.mp.microsoft.com/v8.0/collections/b2bLicensePreview
HEADERS:
"Content-Type: application/json; charset=utf-8",
"Authorization: XBL3.0 x=" . json_decode(file_get_contents($GLOBALS["file"]["webToken"]), true)["DisplayClaims"]["xui"][0]["uhs"] . ";" . json_decode(file_get_contents($GLOBALS["file"]["webToken"]), true)["Token"],
"Host: collections.mp.microsoft.com",
"User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36 Edg/150.0.0.0" // not sure if useragent is needed here
POST DATA:
"maxPageSize" => 200,
"excludeDuplicated" => true,
"expandSatisfyingItems" => true,
"market" => "neutral", // keep neutral here so it does mnot filter games i bought in US/DE/etc
"entitlementFilters" => ["*:Game"]
this returns only first 200 games... if i wish to see next page with another 200 items, then i need to call it exactly same again, plus into post data i need to add "continuationToken" exactly as received in previous responce from this endpoint (if this field "continuationToken" is not present in responce, then no next page is available)
- so far i havent get into any item form this list which would be JUST purchased but not streamable, but probably worth (at least to future versions) make aditional call of those IDs to check if all are perfectly playable
Activity
Geocld commentedon Aug 4, 2026
Hi, bro, I test the b2bLicensePreview API, and request successfully. But I still get the empty data(My account has purchase game), Are you fetch the same API? You can provide some response example for me, thks.
shokarta commentedon Aug 4, 2026
sure... sorry i forgot that for this you need to use xsts token where RelyingParty value is "http://mp.microsoft.com" (also I think if you change your webtoken relying party from http://xboxlive.com to http://mp.microsoft.com then all works for your app normally, you will be able to see all games from xbox etc, plus you shall be able to see purchased items for your account == this is worth trying, better then creating one more token if not needed), so all overall request (in php simplified for you to see the logic) i use:
in generaly, docu is very simple and clear: https://learn.microsoft.com/en-us/gaming/gdk/docs/store/commerce/service-to-service/microsoft-store-apis/xstore-v8-query-for-products?view=gdk-2604