I'm using the custom code option (Python) within a workflow and am trying to call the Hubspot API. I am able to successfully use the Hubspot python library, but I need to call the users endpoints, which are not contained in v4.0.4 of the Hubspot python client used in the workflow client.
When I try to use requests to call the /users endpoint, it seems like the workflow client automatically redacts my Hubspot token in the request and I get an auth error. Below is my error followed by the URL used in the GET request, hapikey was redacted by my client automatically
{'status': 'error', 'message': 'Authentication credentials not found. This API supports both API Key and OAuth 2.0 authentication and you can find more details at https://developers.hubspot.com/docs/methods/auth/oauth-overview', 'correlationId': '2f17cd2d-2fa1-4404-8f9d-85cbb96bd06f', 'category': 'INVALID_AUTHENTICATION'}
https://api.hubapi.com/settings/v3/users/43977603?hapikey=<REDACTED>
My end goal here is to get the email address associated with a particular user that was just assigned a deal to pass along to an outside report. I don't see a standard way of getting that in the properties, but if I missed something please let me know.
@MiaSrebrnjak@BRogers1 has there been any progress on this. I am facing similar issues when trying to create custom crm object using python sdk for a private app. Please reply ASAP
I basically found a workaroud where I'm just making an API call using requests and a private app key vs. URL token and that is working for me. Would be nice if the python library was more up to date, but requests lets us use any public API and the private app key seems to work without issues in the custom code.