diff --git a/intezer_sdk/api.py b/intezer_sdk/api.py index b41087f..c269a30 100644 --- a/intezer_sdk/api.py +++ b/intezer_sdk/api.py @@ -163,7 +163,7 @@ def request_with_refresh_expired_access_token(self, self._refresh_token_if_needed() response = self._request(method, path, data, headers, files, stream, base_url, timeout_in_seconds) - if response.status_code == HTTPStatus.UNAUTHORIZED and not self._token_expiration: + if response.status_code == HTTPStatus.UNAUTHORIZED: self._set_access_token() response = self._request(method, path, data, headers, files, stream, base_url, timeout_in_seconds)