Refresh token mismatch

Hello, HubSpot community,

I’m facing a recurring MISMATCH_REFRESH_TOKEN_CLIENT error with the HubSpot API, specifically during the token refresh process. Despite researching the issue in the community forum and utilizing AI tools, I’ve been unable to resolve it.

Here’s a breakdown of my setup and steps taken:

  • Application: I have a private application within my HubSpot Developer account, connected to my Sandbox account.
  • Token Refresh: After access token expiration, I attempt to refresh it using the /oauth/v1/token endpoint, providing the client secret, client ID, refresh token, and “refresh_token” grant type (as per HubSpot documentation).
  • Error: The response consistently includes the MISMATCH_REFRESH_TOKEN_CLIENT error code and message: refresh token was not issued to this client.

It only happens after the First access token has expired and I’m totally sure I’m using the same ClientId and refresh token provided by Auth process

Hi, @IlkhomUmarov :waving_hand: Welcome to our community!

One thing to try as a debugging step, double-check that the client ID and refresh token used in the token refresh request exactly match those used in the initial authorization process. Also, ensure that the refresh token hasn’t been invalidated or expired, as this could also trigger the error. If the issue keeps happening, you can try generating a new refresh token and starting the process again to see if the error is replicated.

Best,

Jaycee