I had opened a ticket about this issue and the support told me to post on this forum.
We’ve been having an issue in one of our development environment, and it is not possible to reproduce it locally
Below is the issue
HTTPSConnectionPool(host=‘api.hubapi.com’, port=443): Max retries exceeded with url: /oauth/v1/access-tokens/[REDACTED] (Caused by ProtocolError(‘Connection aborted.’, ConnectionResetError(104, ‘Connection reset by peer’)))
And we are using the official python library
Here is a sample code causing the issue
We added a retry policy as suggested by another post
from hubspot import Hubspot
hubspot_client = HubSpot(access_token=access_token)
raw_token_info= hubspot_client.oauth.access_tokens_api.get(
token=self.hubspot_client.access_token,
_request_timeout=(5, 10),
)