Xbox One Smartglass REST API
Project description
Xbox-Smartglass-REST
Open-Source Xbox One Smartglass REST server.
For in-depth information, check out the documentation: (https://openxbox.github.io)
Dependencies
Python >= 3.5
xbox-smartglass-stump (https://pypi.org/project/xbox-smartglass-stump/)
Flask (https://pypi.org/project/Flask/)
Install
Via pip:
pip install xbox-smartglass-rest
How to use
Start the server:
$ xbox-rest-server
Authentication
Authenticate from scratch
For non-2FA enabled account: http://localhost:5557/auth/login For 2FA: http://localhost:5557/auth/oauth # Store tokens on valid authentication http://localhost:5557/auth/store
Load tokens from disk
http://localhost:5557/auth/load http://localhost:5557/auth/refresh
2FA OAuth - POST
# Get authorize url GET http://localhost:5557/auth/url Response-Parameters (JSON): authorization_url # Submit redirect url POST http://localhost:5557/auth/oauth Request-Parameters: redirect_uri
Regular (non-2FA) login - POST
POST http://localhost:5557/auth/login Request-Parameters: email, password
General usage
To see all API endpoints:
http://localhost:5557
Usual usage:
# (Optional) Poweron console http://localhost:5557/device/<liveid>/poweron # Enumerate devices on network http://localhost:5557/device # Connect to console # NOTE: You can POST to /connect with parameter: connect_anonymous=true # .. if console allows it .. http://localhost:5557/device/<liveid>/connect # Use other API endpoints ...
Known issues
Find, report and/or fix them ;)
Bugreporting
When reporting bugs, please make sure to provide the output of the following endpoint
http://localhost:5557/versions
Contribute
Report bugs/suggest features
Improve / add endpoints
Credits
This package uses parts of Cookiecutter and the audreyr/cookiecutter-pypackage project template.
History
0.9.5 (2018-08-16)
Add App Type and Fix Media Status
0.9.4 (2018-08-14)
Add /web/titlehistory endpoint
Enable logfile cmdline argument
Parse proper parameter from /launch/<app_id> and /media/seek/<seek_position>
Standardize media commands and input keys casing
Clean up status codes and auth routes
Add friendly name and display image from titlehub to console_status response if authenticated
Do a best effort token load and refresh on startup, auto dump tokens file on successful auth
Simplify auth url endpoint
Restructure app to be more modular
Add XboxLiveClient and endpoint /web/title/<title_id> for downloading friendly name and displayImage
Allow connecting anonymously when supplying anonymous=true via POST to /connect
Pin xbox-smartglass-stump version
Adding /media/seek endpoint
Add /versions endpoint
Rewrite authentication endpoints, OAUTH and regular auth supported
Rename endpoint /authentication to /auth
0.9.3 (2018-08-08)
Rename /status to /console_status
0.9.2 (2018-08-04)
Stump <headend, livetv, tuner lineups> endpoints
Add console flags
Preparing NANO endpoints
Adjusting authentication endpoint slightly
Allow anonymous connection
0.9.1 (2018-08-04)
Small fixup
0.9.0 (2018-08-04)
First commit on github
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for xbox-smartglass-rest-0.9.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 445b6a378d4374b69465183aa87d8a2b3849460b9057fa896cc20617d203a769 |
|
MD5 | 2045afed8a841192f1f3300c9433812e |
|
BLAKE2b-256 | 9b0676cf9137b7492728d46c957d885c9ac6acc8d3c752d1b3e077b11bf4c71a |
Hashes for xbox_smartglass_rest-0.9.5-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cce22ffee35004ef496b063b041054e6b2c7bce5fb7259544fd9eb12ca8c0724 |
|
MD5 | 8bf624420cfb283ba19c6566cd4ecf71 |
|
BLAKE2b-256 | d4f673521851d42496d7d703036bc5cb79a49144602bf4fffd85ba3bfb4afa8f |