SSL Certificate on api.hubspot.com is out of date


#1

This screenshot was taking from accessing https://api.hubspot.com in Chrome. Obviously most requests to the API should be done with a POST but this exposes the problem.

And in python, using the requests library to make a POST, we see that SSL verification fails there as well.

>>> print(url)
'https://api.hubspot.com/automation/v2/workflows/103/enrollments/contacts/scott+test@stratasan.com?hapikey=<scrubbed>'
>>> requests.post(url)
INFO Starting new HTTPS connection (1): api.hubspot.com
---------------------------------------------------------------------------
SSLError                                  Traceback (most recent call last)
<ipython-input-9-e88177015a6a> in <module>()
----> 1 response = requests.post(url)

/Users/scott/.envs/h/lib/python2.7/site-packages/requests/api.pyc in post(url, data, json, **kwargs)
    105     """
    106
--> 107     return request('post', url, data=data, json=json, **kwargs)
    108
    109

/Users/scott/.envs/h/lib/python2.7/site-packages/requests/api.pyc in request(method, url, **kwargs)
     51     # cases, and look like a memory leak in others.
     52     with sessions.Session() as session:
---> 53         return session.request(method=method, url=url, **kwargs)
     54
     55

/Users/scott/.envs/h/lib/python2.7/site-packages/opbeat/instrumentation/packages/base.pyc in __call__(self, *args, **kwargs)
     61                                       self._self_method,
     62                                       self.__wrapped__, self._self_instance,
---> 63                                       args, kwargs)
     64
     65         else:

/Users/scott/.envs/h/lib/python2.7/site-packages/opbeat/instrumentation/packages/base.pyc in call_if_sampling(self, module, method, wrapped, instance, args, kwargs)
    218     def call_if_sampling(self, module, method, wrapped, instance, args, kwargs):
    219         if not get_transaction():
--> 220             return wrapped(*args, **kwargs)
    221         else:
    222             return self.call(module, method, wrapped, instance, args, kwargs)

/Users/scott/.envs/h/lib/python2.7/site-packages/requests/sessions.pyc in request(self, method, url, params, data, headers, cookies, files, auth, timeout, allow_redirects, proxies, hooks, stream, verify, cert, json)
    466         }
    467         send_kwargs.update(settings)
--> 468         resp = self.send(prep, **send_kwargs)
    469
    470         return resp

/Users/scott/.envs/h/lib/python2.7/site-packages/requests/sessions.pyc in send(self, request, **kwargs)
    574
    575         # Send the request
--> 576         r = adapter.send(request, **kwargs)
    577
    578         # Total elapsed time of the request (approximately)

/Users/scott/.envs/h/lib/python2.7/site-packages/requests/adapters.pyc in send(self, request, stream, timeout, verify, cert, proxies)
    445         except (_SSLError, _HTTPError) as e:
    446             if isinstance(e, _SSLError):
--> 447                 raise SSLError(e, request=request)
    448             elif isinstance(e, ReadTimeoutError):
    449                 raise ReadTimeout(e, request=request)

SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)

#2

Hi @sburns

The HubSpot APIs use the api.hubapi.com domain, not hubspot.com.

api.hubspot.com does resolve but it’s not actually used for anything. Did you happen to see a link or example using that somewhere?


#3

My apologies! 100% user error here.