You need a Microsoft OAuth 2.0 refresh token acquired with Minecraft client id.
The test code uses client id from Nintendo
by default (client_id=00000000441cc96b),
and if you want to use another client id to login, replace this line val deviceInfo = XboxDeviceInfo.DEVICE_ANDROID
in Main.kt
.
- visit this link in your browser.
- get the microsoft authorization code
- save the microsoft authorization code into
.ms_refresh_token
file and run the program once to convert the code into refresh token