A backend and frontend application to gather and visualize the current wait times on Xbox Cloud Gaming.
cd xbox_cloud_statistics/poetry installto install the dependencies- Create an App registration at Microsoft Azure
- See https://learn.microsoft.com/en-us/azure/active-directory/develop/quickstart-register-app
- Use
Personal Microsoft accounts onlyasSupported account types CLIENT_IDrefers toApplication (client) IDin AzureCLIENT_SECRETrefers to the value of the client secret in Azure
- Authenticate as a Xbox Cloud Gaming user
- Run
poetry run xbox-cloud-authenticate --client-id $CLIENT_ID --client-secret $CLIENT_SECRET - Open the URL displayed in your browser and log in with your Xbox Cloud Gaming account
- You will be redirected to e.g.
http://localhost/auth/callback?code=..., paste thecodeintoxbox-cloud-authenticateand hit enter - The output will contain a
refresh_token- If you authenticated with a Free-to-Play account, this this the
F2P_TOKEN - If you authenticated with a Game Pass Ultimate account, this this the
GPU_TOKEN
- If you authenticated with a Free-to-Play account, this this the
- Run
- Setup InfluxDB (create organization, bucket and API token)
- Export environment variables
CLIENT_IDandCLIENT_SECRETto authenticate as the App registration - Export environment variables
F2P_TOKENandGPU_TOKENto authenticate as the user - Export environment variables
INFLUXDB_URL,INFLUXDB_ORG,INFLUXDB_BUCKETandINFLUXDB_TOKENto connect to InfluxDB - Run
poetry run xbox-cloud-statistics, printing a table with the results and writing them to InfluxDB
➜ xbox_cloud_statistics git:(main) poetry run xbox-cloud-statistics
| Game | Region | Subscription | Server time | Wait time (s) |
|----------------------------------------------|--------------------|------------------|---------------------------|-----------------|
| FORTNITE | AustraliaEast | Subscription.F2P | 2023-10-22 10:05:46+00:00 | 704 |
| FORTNITE | AustraliaEast | Subscription.GPU | 2023-10-22 10:05:47+00:00 | 38 |
| FORTNITE | AustraliaSouthEast | Subscription.F2P | 2023-10-22 10:05:46+00:00 | 704 |
| FORTNITE | AustraliaSouthEast | Subscription.GPU | 2023-10-22 10:05:47+00:00 | 38 |
| FORTNITE | BrazilSouth | Subscription.F2P | 2023-10-22 10:05:45+00:00 | 10 |
| FORTNITE | BrazilSouth | Subscription.GPU | 2023-10-22 10:05:47+00:00 | 10 |
| FORTNITE | EastUS | Subscription.F2P | 2023-10-22 10:05:45+00:00 | 10 |
[...]
The configuration file (config.toml) contains all games that should be queried.
The example below shows the configuration for Fortnite with Xbox Cloud ID FORTNITE, title Fortnite and image (poster) URL and the subscriptions its available in (Free-to-Play and Game Pass Ultimate):
[games.FORTNITE]
title = "Fortnite"
image_url = "https://store-images.s-microsoft.com/image/apps.9582.70702278257994163.a9af653c-54d0-4c47-a1f0-bd2f08fe0fd1.3ea1af1a-95a6-4543-be33-94c112ed5dc3"
subscriptions = ["F2P", "GPU"]
After adding new games to the configuration, please run poetry run toml-sort -i config.toml to keep them sorted.
cd site_generator/- Run
poetry installto install the dependencies - Run
python3 -m http.server -d dist/to start a local HTTP server (useful for development)
- Export environment variables
INFLUXDB_URL,INFLUXDB_ORG,INFLUXDB_BUCKETandINFLUXDB_TOKENto connect to InfluxDB - Run
poetry run site-generatorto build the static page todist/
demo.mp4
The measurement data is available in a private InfluxDB instance. Feel free to message me to request access.