fix: Refactor SuperOfficeClient to support production environments and global token endpoints [31188f42]

This commit is contained in:
2026-02-26 07:15:16 +00:00
parent 878e555b5c
commit 3baf63eafb

View File

@@ -28,7 +28,7 @@ class SuperOfficeClient:
self.access_token = None
return
self.base_url = f"https://app-{self.env}.superoffice.com/{self.cust_id}/api/v1"
self.base_url = f"https://{self.env}.superoffice.com/{self.cust_id}/api/v1"
self.access_token = self._refresh_access_token()
if not self.access_token:
@@ -43,7 +43,7 @@ class SuperOfficeClient:
def _refresh_access_token(self):
"""Refreshes and returns a new access token."""
url = f"https://{self.env}.superoffice.com/login/common/oauth/tokens"
url = "https://online.superoffice.com/login/common/oauth/tokens"
logger.debug(f"DEBUG: Refresh URL: '{url}' (Env: '{self.env}')")
data = {