Hello,
I am trying to refresh the token when it expires. Up until recently, the error code received from HubSpot on a “The access token is expired or invalid” message was 401. However, lately I have been also seeing 404 code in these cases. So now I see *both* error codes in the same catch. Is it intentionally? Which error code should I rely on when attempting to handle this error?
Hi, @testctrl
Thanks for posting. To clarify, this is the endpoint you are referring to? — Refresh OAuth 2.0 access token
Additionally, you are saying that you are getting back two separate 400 errors in the same response? To make sure I understand correctly.
Thanks for the additional information!
— Jaycee
It happens on any endpoint - when the token is expired.
Sometimes I receive 404, sometimes 401. Not simulatenously, of course.
However, I can receive both responses on the same endpoint. My guess is that there are two different servers on your side - and they behave differently in this case.
@Jaycee_Lewis Hey, have you seen my reply?