From 6c0202c0b40ad954d2830771b71806de92c70f7c Mon Sep 17 00:00:00 2001 From: coreywillwhat <104224685+coreywillwhat@users.noreply.github.com> Date: Fri, 26 Jul 2024 12:13:58 -0600 Subject: [PATCH] Update audi_services.py --- custom_components/audiconnect/audi_services.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/custom_components/audiconnect/audi_services.py b/custom_components/audiconnect/audi_services.py index e6f2cd4a..9f988b17 100644 --- a/custom_components/audiconnect/audi_services.py +++ b/custom_components/audiconnect/audi_services.py @@ -412,8 +412,8 @@ async def _get_home_region_setter(self, vin: str): async def _get_security_token(self, vin: str, action: str): # Challenge headers = { - "User-Agent": "okhttp/3.7.0", - "X-App-Version": "3.14.0", + "User-Agent": HDR_USER_AGENT, + "X-App-Version": HDR_XAPP_VERSION, "X-App-Name": "myAudi", "Accept": "application/json", "Authorization": "Bearer " + self.vwToken.get("access_token"), @@ -447,9 +447,9 @@ async def _get_security_token(self, vin: str, action: str): } headers = { - "User-Agent": "okhttp/3.7.0", + "User-Agent": HDR_USER_AGENT, "Content-Type": "application/json", - "X-App-Version": "3.14.0", + "X-App-Version": HDR_XAPP_VERSION, "X-App-Name": "myAudi", "Accept": "application/json", "Authorization": "Bearer " + self.vwToken.get("access_token"), @@ -471,7 +471,7 @@ def _get_vehicle_action_header(self, content_type: str, security_token: str): "Host": "mal-3a.prd.eu.dp.vwg-connect.com" if self._country.upper() == REGION_USA else "msg.volkswagen.de", - "X-App-Version": "4.26.0", + "X-App-Version": HDR_XAPP_VERSION, "X-App-Name": "myAudi", "Authorization": "Bearer " + self.vwToken.get("access_token"), "Accept-charset": "UTF-8",