Skip to content
This repository has been archived by the owner on Sep 13, 2019. It is now read-only.

smockle-archive/xbox-smartglass-rest-python

 
 

Repository files navigation

Xbox-Smartglass-REST

Latest Version https://travis-ci.com/OpenXbox/xbox-smartglass-rest-python.svg?branch=master Docker Build Status Discord chat channel

Open-Source Xbox One Smartglass REST server.

For in-depth information, check out the documentation: (https://openxbox.github.io)

Dependencies

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
# NOTE: You can specify device by ip: /device/<liveid>/poweron?addr=192.168.0.123
# Enumerate devices on network
# NOTE: You can enumerate device by specific ip: /device?addr=192.168.0.123
http://localhost:5557/device
# Connect to console
# NOTE: You can connect anonymously: /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.

About

Xbox One SmartGlass RESTful server

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 89.0%
  • HTML 4.1%
  • Makefile 3.4%
  • CSS 2.1%
  • Dockerfile 1.4%