From 5743a3cef1688e8fd5eb635a84c11816d8cd2219 Mon Sep 17 00:00:00 2001 From: Sat727 <116710399+Sat727@users.noreply.github.com> Date: Sun, 8 Feb 2026 08:05:13 -0500 Subject: [PATCH 1/3] Add refresh_token field to authentication model --- xbox/webapi/authentication/models.py | 1 + 1 file changed, 1 insertion(+) diff --git a/xbox/webapi/authentication/models.py b/xbox/webapi/authentication/models.py index 45578376..a60df88d 100644 --- a/xbox/webapi/authentication/models.py +++ b/xbox/webapi/authentication/models.py @@ -125,6 +125,7 @@ class SisuAuthorizationResponse(PascalCaseModel): authorization_token: XSTSResponse web_page: str sandbox: str + refresh_token: str use_modern_gamertag: Optional[bool] = None From d3bb9911c860d23e51b9f556fb79b0270efce20b Mon Sep 17 00:00:00 2001 From: Sat727 <116710399+Sat727@users.noreply.github.com> Date: Sun, 8 Feb 2026 08:07:40 -0500 Subject: [PATCH 2/3] Add refresh token parameter to do_sisu_authorization --- xbox/webapi/authentication/xal.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/xbox/webapi/authentication/xal.py b/xbox/webapi/authentication/xal.py index ffb05c22..72416570 100644 --- a/xbox/webapi/authentication/xal.py +++ b/xbox/webapi/authentication/xal.py @@ -231,8 +231,8 @@ async def request_sisu_authentication( resp.headers["X-SessionId"], ) - async def do_sisu_authorization( - self, sisu_session_id: str, access_token_jwt: str, device_token_jwt: str + async def do_sisu_authorization( + self, sisu_session_id: str, access_token_jwt: str, device_token_jwt: str, refresh_sisu:str ) -> SisuAuthorizationResponse: """ Sisu authorization @@ -250,14 +250,16 @@ async def do_sisu_authorization( "SiteName": "user.auth.xboxlive.com", "SessionId": sisu_session_id, "ProofKey": self.session.request_signer.proof_field, + "refresh_token": refresh_sisu, } resp = await self.session.send_signed( "POST", url, headers=headers, json=post_body ) resp.raise_for_status() - return SisuAuthorizationResponse(**resp.json()) - + response_data = resp.json() + return SisuAuthorizationResponse(**response_data) + async def xsts_authorization( self, device_token_jwt: str, From 47c278160dc30ef9e7635de9f530a7196eafb65b Mon Sep 17 00:00:00 2001 From: Sat727 <116710399+Sat727@users.noreply.github.com> Date: Sun, 8 Feb 2026 08:11:15 -0500 Subject: [PATCH 3/3] Simplify response handling in send_signed method --- xbox/webapi/authentication/xal.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/xbox/webapi/authentication/xal.py b/xbox/webapi/authentication/xal.py index 72416570..0245681d 100644 --- a/xbox/webapi/authentication/xal.py +++ b/xbox/webapi/authentication/xal.py @@ -257,8 +257,7 @@ async def do_sisu_authorization( "POST", url, headers=headers, json=post_body ) resp.raise_for_status() - response_data = resp.json() - return SisuAuthorizationResponse(**response_data) + return SisuAuthorizationResponse(**resp.json()) async def xsts_authorization( self,