Skip to content

Latest commit

 

History

History
214 lines (168 loc) · 11.3 KB

2.Web.md

File metadata and controls

214 lines (168 loc) · 11.3 KB

2. Web API

This document mainly introduces network interfaces related to the Xbox UI layer, such as obtaining the console list, user information, cloud game list, cloud game details, etc.

2.1 Get Console

Get the registered consoles under the current account

Prerequisite: Already logged in and able to obtain webToken from 1.10.1:

{
  IssueInstant: '2024-05-08T09:26:59.4788867Z',
  NotAfter: '2024-05-09T01:26:59.4788867Z',
  Token: 'eyJlbmMiOi...UT5BPqexEDHfhwk2upiNzw',  // Used for this console list retrieval
  DisplayClaims: {
      "xui": [
        {
          "gtg": "Geocld",
          "xid": "2535466257699046",
          "uhs": "8920341548513246887", // Used for this console list retrieval
          "agg": "Adult",
          "usr": "195 234",
          "prv": "184 185 186 187 188 190 191 193 196 198 199 200 201 203 204 205 206 208 211 217 220 224 227 228 235 238 245 247 249 252 254 255"
        }
      ]
    }
}

API: https://xccs.xboxlive.com/lists/devices?queryCurrentDevice=false&includeStorageDevices=true

Method: GET

Header:

{
    'Authorization': 'XBL3.0 x='+ webTokens.DisplayClaims.xui[0].uhs + ';' + webTokens.Token,
    'Accept-Language' : 'en-US',
    'x-xbl-contract-version': '2',
    'x-xbl-client-name': 'XboxApp',
    'x-xbl-client-type': 'UWA',
    'x-xbl-client-version': '39.39.22001.0',
}

Response:

{
   status: { errorCode: 'OK', errorMessage: null },
   result: [
    {
      id: 'F4001D0F950AA28A',
      name: '客厅 Xbox',
      locale: 'zh-Hans-SG',
      powerState: 'ConnectedStandby',
      consoleType: 'XboxSeriesS'
    }
   ],
   agentUserId: null
}

The returned console includes information such as the console name, power state, and model type. The most important is the id, which will be the key to starting streaming.

2.2 Achievement List

TODO

2.3 Friend List

TODO

2.4 Get All XGPU Cloud Games

API: https://uks.core.gssv-play-prodxhome.xboxlive.com/v2/titles

Method: GET

Headers:

{
    'Content-Type': 'application/json',
    'Authorization': 'Bearer '+ xCloudToken.GS_TOKEN,
}

Response:

[
    eTag: '9EFED184',
  totalItems: 421,
    results: [
      {
          "titleId":"AGEOFEMPIRESIIDEFINITIVEEDITION",
           "details":{
              "productId":"9N2Z748SPMTM",
              "xboxTitleId":2064168993,
              "hasEntitlement":true,
              "supportsInAppPurchases":true,
              "supportedTabs":null,
              "supportedInputTypes":[
                 "Controller",
                 "NativeTouch",
                 "GenericTouch"
             ],
              "programs":[
                 "GPULTIMATE"
              ],
              "userPrograms":[
                 "GPULTIMATE"
              ],
              "userSubscriptions":[
                 "XGPULTIMATE"
              ],
              "isFreeInStore":false,
              "maxGameplayTimeInSeconds":null
           }
        }
     ]
]

2.5 Get Cloud Game Details

API: https://catalog.gamepass.com/v3/products?market=US&language=en-US&hydration=RemoteHighSapphire0

method: POST

headers:

'Content-Type': 'application/json',
'ms-cv': 0,
'calling-app-name': 'Xbox Cloud Gaming Web',
'calling-app-version': '21.0.0',

body:

{
    Products: [titleId1, titleId2, ...]
}

response:

{
    [titleId]: {
        ProductTitle: '',
        ProductDescription: ''
        ...
        // The content is too much, please refer to the separate notes.
    }
}

2.6 Get newly added cloud games

url: https://catalog.gamepass.com/sigls/v2?id=f13cf6b4-57e6-4459-89df-6aec18cf0538&market=US&language=en-US

method: GET

public API , no token required

response:

[
    {
        "siglId": "f13cf6b4-57e6-4459-89df-6aec18cf0538",
        "title": "Recently added",
        "description": "With games added all the time, you'll always have something new to play",
        "requiresShuffling": "False",
        "imageUrl": "http://store-images.s-microsoft.com/image/global.47673.acentoprodimg.40520333-055e-420a-bd6e-39b85591ccd3.65c04579-754f-40be-a1f2-f0e983dba803"
    },
    {
        "id": "9N1L0KL84B56" // productId
    },
    {
        "id": "9P33X3C755SK"
    },
]

The response only includes the ID of the game, you need to combine it with the list collection in 2.4 for display.

2.7 Get the latest cloud gaming experience

API: https://uks.core.gssv-play-prodxhome.xboxlive.com/v2/titles/mru?mr=25

Method: GET

headers:

{
    'Content-Type': 'application/json',
    'Authorization': 'Bearer '+ xCloudToken.GS_TOKEN,
}

response:

{"results":[{"titleId":"ANOTHERCRABSTREASURE","details":{"productId":"9P97ZTRTH25W","xboxTitleId":1682965706,"hasEntitlement":true,"supportsInAppPurchases":true,"supportedTabs":null,"supportedInputTypes":["Controller"],"programs":["GPULTIMATE"],"userPrograms":[],"userSubscriptions":[],"isFreeInStore":false,"maxGameplayTimeInSeconds":null},"titleHistory":{"lastTimePlayed":"2024-06-12T10:09:31.1265541Z"}},{"titleId":"SENUASSAGAHELLBLADEII","details":{"productId":"9PMBB7NGHV95","xboxTitleId":1835926818,"hasEntitlement":true,"supportsInAppPurchases":true,"supportedTabs":[{"id":"31f99a9d-6881-452b-9cd9-920f81d2ea4a","tabVersion":"1.0.0.0","layoutVersion":"4.0","manifestVersion":"2.0"}],"supportedInputTypes":["Controller","CustomTouchOverlay"],"programs":["GPULTIMATE"],"userPrograms":[],"userSubscriptions":[],"isFreeInStore":false,"maxGameplayTimeInSeconds":null},"titleHistory":{"lastTimePlayed":"2024-06-11T05:00:18.9383006Z"}},{"titleId":"SWORDANDFAIRYTOGETHERFOREVER","details":{"productId":"9P8JHB7V4T5M","xboxTitleId":1931854950,"hasEntitlement":true,"supportsInAppPurchases":true,"supportedTabs":null,"supportedInputTypes":["Controller"],"programs":["GPULTIMATE"],"userPrograms":[],"userSubscriptions":[],"isFreeInStore":false,"maxGameplayTimeInSeconds":null},"titleHistory":{"lastTimePlayed":"2024-06-08T05:11:13.6475698Z"}},{"titleId":"BATTLEFIELD2042XBOXSERIESXS","details":{"productId":"9P0T51BDDWVT","xboxTitleId":2106872096,"hasEntitlement":true,"supportsInAppPurchases":true,"supportedTabs":null,"supportedInputTypes":["Controller"],"programs":["GPULTIMATE"],"userPrograms":[],"userSubscriptions":[],"isFreeInStore":false,"maxGameplayTimeInSeconds":null},"titleHistory":{"lastTimePlayed":"2024-06-06T09:31:00.0125272Z"}},{"titleId":"FORZAHORIZON5","details":{"productId":"9NKX70BBCDRN","xboxTitleId":2030093255,"hasEntitlement":true,"supportsInAppPurchases":true,"supportedTabs":null,"supportedInputTypes":["Controller"],"programs":["GPULTIMATE"],"userPrograms":[],"userSubscriptions":[],"isFreeInStore":false,"maxGameplayTimeInSeconds":null},"titleHistory":{"lastTimePlayed":"2024-05-31T13:05:46.8542512Z"}},{"titleId":"LIESOFP","details":{"productId":"9PCM4CMTPPGC","xboxTitleId":2071061510,"hasEntitlement":true,"supportsInAppPurchases":true,"supportedTabs":null,"supportedInputTypes":["Controller"],"programs":["GPULTIMATE"],"userPrograms":[],"userSubscriptions":[],"isFreeInStore":false,"maxGameplayTimeInSeconds":null},"titleHistory":{"lastTimePlayed":"2024-05-31T12:02:41.6829304Z"}},{"titleId":"GEARS5","details":{"productId":"9P4KMR76PLLQ","xboxTitleId":374923716,"hasEntitlement":true,"supportsInAppPurchases":true,"supportedTabs":[{"id":"9543972f-cb37-477c-a46e-97cb0378be3b","tabVersion":"1.0.1.1","layoutVersion":"3.0.0.0","manifestVersion":"2.0.0.0"},{"id":"93ff071b-dd7d-4dc5-b84f-938d1cd1efa4","tabVersion":"1.0.2.0","layoutVersion":"3.0","manifestVersion":"2.0"}],"supportedInputTypes":["Controller","CustomTouchOverlay"],"programs":["GPULTIMATE"],"userPrograms":[],"userSubscriptions":[],"isFreeInStore":false,"maxGameplayTimeInSeconds":null},"titleHistory":{"lastTimePlayed":"2024-05-31T12:01:32.7643391Z"}},{"titleId":"STARWARSJEDIFALLENORDER","details":{"productId":"C2CSDTSCBZ0C","xboxTitleId":680942588,"hasEntitlement":true,"supportsInAppPurchases":true,"supportedTabs":null,"supportedInputTypes":["Controller"],"programs":["GPULTIMATE"],"userPrograms":[],"userSubscriptions":[],"isFreeInStore":false,"maxGameplayTimeInSeconds":null},"titleHistory":{"lastTimePlayed":"2024-05-23T15:49:11.8414772Z"}},{"titleId":"ITTAKESTWO","details":{"productId":"9NXVC0482QS5","xboxTitleId":2054716369,"hasEntitlement":true,"supportsInAppPurchases":true,"supportedTabs":null,"supportedInputTypes":["Controller"],"programs":["GPULTIMATE"],"userPrograms":[],"userSubscriptions":[],"isFreeInStore":false,"maxGameplayTimeInSeconds":null},"titleHistory":{"lastTimePlayed":"2024-05-22T09:36:02.802124Z"}},{"titleId":"ORIANDTHEWILLOFTHEWISPS","details":{"productId":"9n8cd0xzklp4","xboxTitleId":1659804324,"hasEntitlement":true,"supportsInAppPurchases":true,"supportedTabs":null,"supportedInputTypes":["Controller"],"programs":["GPULTIMATE"],"userPrograms":[],"userSubscriptions":[],"isFreeInStore":false,"maxGameplayTimeInSeconds":null},"titleHistory":{"lastTimePlayed":"2024-05-21T16:30:57.5503938Z"}},{"titleId":"HALOINFINITE","details":{"productId":"9NP1P1WFS0LB","xboxTitleId":2043073184,"hasEntitlement":true,"supportsInAppPurchases":true,"supportedTabs":null,"supportedInputTypes":["Controller","MKB"],"programs":["GPULTIMATE"],"userPrograms":[],"userSubscriptions":[],"isFreeInStore":false,"maxGameplayTimeInSeconds":null},"titleHistory":{"lastTimePlayed":"2024-05-17T14:03:03.7126612Z"}},{"titleId":"GEARSOFWAR4","details":{"productId":"9nblggh4pbbm","xboxTitleId":552499398,"hasEntitlement":true,"supportsInAppPurchases":true,"supportedTabs":null,"supportedInputTypes":["Controller"],"programs":["GPULTIMATE"],"userPrograms":[],"userSubscriptions":[],"isFreeInStore":false,"maxGameplayTimeInSeconds":null},"titleHistory":{"lastTimePlayed":"2024-05-17T14:00:03.082444Z"}},{"titleId":"ASSASSINSCREEDVALHALLA","details":{"productId":"9P4NJFH17MRT","xboxTitleId":1728105232,"hasEntitlement":true,"supportsInAppPurchases":true,"supportedTabs":null,"supportedInputTypes":["Controller"],"programs":["GPULTIMATE"],"userPrograms":[],"userSubscriptions":[],"isFreeInStore":false,"maxGameplayTimeInSeconds":null},"titleHistory":{"lastTimePlayed":"2024-05-17T11:35:35.6273833Z"}},{"titleId":"APLAGUETALEREQUIEM","details":{"productId":"9ND0JVB184XL","xboxTitleId":2089483628,"hasEntitlement":true,"supportsInAppPurchases":true,"supportedTabs":null,"supportedInputTypes":["Controller"],"programs":["GPULTIMATE"],"userPrograms":[],"userSubscriptions":[],"isFreeInStore":false,"maxGameplayTimeInSeconds":null},"titleHistory":{"lastTimePlayed":"2024-05-06T22:27:11.4929641Z"}},{"titleId":"REMNANTIISTANDARDEDITION","details":{"productId":"9P9278ZMGQLJ","xboxTitleId":1995576035,"hasEntitlement":true,"supportsInAppPurchases":true,"supportedTabs":null,"supportedInputTypes":["Controller"],"programs":["GPULTIMATE"],"userPrograms":[],"userSubscriptions":[],"isFreeInStore":false,"maxGameplayTimeInSeconds":null},"titleHistory":{"lastTimePlayed":"2024-05-01T15:15:28.858937Z"}}]}
  greenlight:Ipc:Send Sending event: [xCloud] {"action":"getRecentTitles","id":95,"data":["ANOTHERCRABSTREASURE","SENUASSAGAHELLBLADEII","SWORDANDFAIRYTOGETHERFOREVER","BATTLEFIELD2042XBOXSERIESXS","FORZAHORIZON5","LIESOFP","GEARS5","STARWARSJEDIFALLENORDER","ITTAKESTWO","ORIANDTHEWILLOFTHEWISPS","HALOINFINITE","GEARSOFWAR4","ASSASSINSCREEDVALHALLA","APLAGUETALEREQUIEM","REMNANTIISTANDARDEDITION"]}