xbox-webapi-python
xbox-webapi-python copied to clipboard
xbox-xal command now found
I'm not a python user at all, so apologies if this is basic stuff. But I saw the setup.py references the xbox-xal command for the relevant script. However, when I run it, I get "command not found" on MacOS.
/Users/me ~ xbox-xal
zsh: command not found: xbox-xal
I then cloned the repo and tried to run it directly:
xbox-webapi-python (me: master) ~ python xbox/webapi/scripts/xal.py
Traceback (most recent call last):
File "/Users/me/projects/xbox-webapi-python/xbox/webapi/scripts/xal.py", line 13, in <module>
from xbox.webapi.authentication.models import (
ImportError: cannot import name 'SisuAuthorizationResponse' from 'xbox.webapi.authentication.models' (/Users/me/.pyenv/versions/3.9.0/lib/python3.9/site-packages/xbox/webapi/authentication/models.py)
I really want to test these new tokens and API calls with gameclips and screenshots, can we improve the readme on how to make these calls? Should it be stupid easy to use the API classes in the repo for a python noob like me? 😅
Tried in a fresh environment:
- Execute:
$ cd /tmp
$ mkdir webapi-reproduce-xal
$ cd webapi-reproduce-xal
$ git clone [email protected]:OpenXbox/xbox-webapi-python.git
Cloning into 'xbox-webapi-python'...
remote: Enumerating objects: 3203, done.
remote: Counting objects: 100% (744/744), done.
remote: Compressing objects: 100% (313/313), done.
remote: Total 3203 (delta 407), reused 681 (delta 378), pack-reused 2459
Receiving objects: 100% (3203/3203), 1.30 MiB | 3.09 MiB/s, done.
Resolving deltas: 100% (1826/1826), done.
$ python -m venv venv
$ . venv/bin/activate
$ pip install .
$ xbox-xal
Continue auth with the following URL:
URL: https://login.live.com/oauth20_authorize.srf?lw=1&fl=dob,easi2&xsup=1&display=android_phone&code_challenge=$&code_challenge_method=S256&state=$&client_id=000000004C20A908&response_type=code&scope=service%3A%3Auser.auth.xboxlive.com%3A%3AMBI_SSL&redirect_uri=ms-xal-public-beta-000000004c20a908%3A%2F%2Fauth&nopa=2
Provide redirect URI:
- Open the URL in browser, toggle Dev Tools, Network tab
- When auth finished, copy URL Link from network tab which starts with
?code= - Paste into the CLI window
- Hit ENTER
- Expected output:
<Some raw token data>
Finished authentication, writing tokens to /home/username/.local/share/xbox/xal_tokens.json
NOTE: It's currently not possible to use the received token with XboxLiveClient session in this lib, the abstraction for that is missing. Currently have no idea how to properly implement it.
When it's ready-to-use, the README / docs will get updated.