OpenXbox / xbox-webapi-python

A python library to authenticate with Xbox Live via your Microsoft Account and provides Xbox related Web-API.
https://pypi.python.org/pypi/xbox-webapi
MIT License
175 stars 44 forks source link

Porting to Groovy #30

Closed cdnninja closed 3 years ago

cdnninja commented 3 years ago

Not an issue but more of a question. I have been using this code as an example to port to groovy but having a heck of a time. I am definitely no dev just like to dabble. I can't even get it working correctly in postman. Any chance someone could screenshot step by step in postman? I am trying to:

  1. Do a webbrowser based auth.
  2. Take the tokens returned and get an xsts token
  3. Run a get presence. (This is easy once I figure out how to get an xsts token).

My end game is making presence work in Smartthings to allow for lighting automation depending on what app you are in. I have that part working either by manually getting the xsts from this code or using xapi which always seems to loose authentication. I just need to integrate better authentication into it.

tuxuser commented 3 years ago

This is probably easier to understand.

https://gist.github.com/tuxuser/8b7cc153cdecd0a9c3f2694850fa90bd

For registering your application with Azure AD check this repos README.