Hey everyone,
Since Hubspot doesn’t have a webhook for calls, I am instead polling the https://api.hubapi.com/crm/v3/objects/calls/search endpoint. This works fine most of the time. However, every once in a while, I get a 401 Unauthorized response with an odd message:
The OAuth token used to make this call expired 0 second(s) ago.
What is odd is that the OAuth token works fine most of the time. If it were always failing, then that would make sense, but it mostly works. It only sometimes fails. It also fails for a few different users, but I can’t see any pattern or reason why it would fail like this. It is always 0 seconds as well.
I have tried to create a try/catch in which if it fails like this, I will refresh the token and try again. However, it keeps failing again, as well for 0 seconds.
Has anyone seen this before? Any ideas on how to fix it?
Thanks!