# BAD\_REFRESH\_TOKEN Error Even Though App is Still Installed

**URL:** <https://community.hubspot.com/t/bad-refresh-token-error-even-though-app-is-still-installed/151316>\
**Category:** APIs & Integrations\
**Tags:** oauth\
**Created:** [June 25, 2026, 5:20am UTC](https://community.hubspot.com/t/bad-refresh-token-error-even-though-app-is-still-installed/151316 "2026-06-25T05:20:33Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![activepieces](https://avatars.discourse-cdn.com/v4/letter/a/58f4c7/32.png) [@activepieces](https://community.hubspot.com/u/activepieces)\
**Post date:** [June 25, 2026, 5:20am UTC](https://community.hubspot.com/t/bad-refresh-token-error-even-though-app-is-still-installed/151316/1 "2026-06-25T05:20:33Z")

</div>

Hey folks,

One of our users is consistently getting this error when we try to refresh their access token via `POST ``https://api.hubapi.com/oauth/v1/token`:

```auto
{
  "error": "invalid_grant",
  "error_description": "missing or invalid refresh token",
  "status": "BAD_REFRESH_TOKEN"
}

```

We’ve already gone through the usual suspects:

- App is **not uninstalled** from their portal, the installation is active.
- Connected user is a **Super Admin.**

Re-authenticating fixes it temporarily, but the error comes back again after a while. So it’s not a one-time thing, the refresh token keeps getting invalidated somehow.

We tried checking the auth logs in the legacy app monitoring dashboard but it’s not accessible, just showing a migration prompt. We’re planning to migrate to the new app framework soon, but need to unblock this user in the meantime.

Any help would be appreciated!

---

<div class="post-metadata">

**Author:** ![Berangere](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/berangere/32/220784_2.png) [@Berangere](https://community.hubspot.com/u/Berangere)\
**Post date:** [June 25, 2026, 9:56am UTC](https://community.hubspot.com/t/bad-refresh-token-error-even-though-app-is-still-installed/151316/3 "2026-06-25T09:56:40Z")

</div>

Hey @activepieces and welcome, we are so glad to have you here! 🧡

Thanks for reaching out to the HubSpot Community!

It’s great to know the steps/verifications you have already taken. And glad to hear that it gets fixed with re-authentication, even if I understand that’s not ideal. Now, let’s see how we can help!

To start with, here are a few things to check:

- Are you storing and using the new refresh token from every /oauth/v1/token response?
- Are you avoiding simultaneous refreshes from multiple servers or processes?
- Are you refreshing tokens only when needed (i.e., when expires\_in is reached)?

Also, I’d love to hear from our Top Experts: Hi @Anton, @zach_threadint and @coldrickjack do you have suggestions to help @activepieces, please?

On a side note, it’s great to hear that you are planning the migration to /oauth/2026-03/token soon because /oauth/v1/token is indeed deprecated and will be sunset on February 16, 2027.

Here is the documentation for reference:

- [Manage OAuth access tokens using the v3 APIs - HubSpot docs](https://developers.hubspot.com/docs/api-reference/legacy/authentication/manage-oauth-tokens)
- [Migrate from the OAuth v1 API to the latest date-based versioned API - HubSpot docs](https://developers.hubspot.com/docs/api-reference/legacy/authentication/oauth-tokens/v1/migration-guide)

Thanks so much and have a wonderful day!  
Bérangère

_This post was created with the assistance of AI tools_

---

<div class="post-metadata">

**Author:** ![zach\_threadint](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/zach_threadint/32/46318_2.png) [@zach\_threadint](https://community.hubspot.com/u/zach_threadint)\
**Post date:** [June 25, 2026, 11:02pm UTC](https://community.hubspot.com/t/bad-refresh-token-error-even-though-app-is-still-installed/151316/5 "2026-06-25T23:02:57Z")

</div>

Hi @activepieces 👋

That’s a strange one. From memory, this sort of inconsistency is not something I’ve seen before with the V1 OAuth endpoints. Generally speaking, refresh tokens are unique per combination of HubSpot User + HubSpot Portal. At least in my experience, even if a specific user installs an app several times within a single HubSpot Portal, the resulting refresh token generally will remain the same. Is this consistent with your experience?

Also, a few things to clarify that might help the community troubleshoot this with you:

1. Please share with us more information relating to the requests that fail and those that succeed (e.g. request header(s), JSON body). **Please be sure to not expose any sensitive information** (e.g. redact refresh token and client secret values).
2. How are you storing and retrieving your refresh tokens (e.g. user-specific vs. portal-specific, favour most recent etc.)?
3. How many different app users have installed the app in the affected portal?

Please let me know if you have any follow-up questions.

---

<div class="post-metadata">

**Author:** ![activepieces](https://avatars.discourse-cdn.com/v4/letter/a/58f4c7/32.png) [@activepieces](https://community.hubspot.com/u/activepieces)\
**Post date:** [June 26, 2026, 5:52am UTC](https://community.hubspot.com/t/bad-refresh-token-error-even-though-app-is-still-installed/151316/6 "2026-06-26T05:52:00Z")

</div>

Hi @Bérangère and @coldrickjack, thanks for the detailed responses!

To answer your questions:

1. **Storing new refresh token** — Yes, we store the new refresh token from every response.
2. **Refreshing only when needed** — Yes, we only refresh when the token is actually expired.
3. **Simultaneous refreshes** — We suspect this could be a factor and are currently investigating internally with our team.

@coldrickjack — great point on refresh token uniqueness, that’s helpful context. To your follow-up questions:

1. **Failing vs succeeding requests** — Here’s the request format we send to `https://api.hubapi.com/oauth/v1/token`:

```auto
POST https://api.hubapi.com/oauth/v1/token
Content-Type: application/x-www-form-urlencoded
Accept: application/json

grant_type=refresh_token&refresh_token=<redacted>&client_id=<redacted>&client_secret=<redacted>

```

The response on failure:

```auto
{
  "error": "invalid_grant",
  "error_description": "missing or invalid refresh token",
  "status": "BAD_REFRESH_TOKEN"
}

```

1. **How we store and retrieve refresh tokens** — We store one refresh token per connected user (not per portal), encrypted, and always use the most recently received token.
2. **How many app users have installed in the affected portal** — Checking with the affected users and will follow up.

Also appreciate the heads up on the deprecation timeline — migration is already on our roadmap!

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [June 30, 2026, 12:44pm UTC](https://community.hubspot.com/t/bad-refresh-token-error-even-though-app-is-still-installed/151316/7 "2026-06-30T12:44:58Z")

</div>

Automatically bumped on June 30, 2026, 12:44pm UTC



---

<div class="post-metadata">

**Author:** ![Berangere](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/berangere/32/220784_2.png) [@Berangere](https://community.hubspot.com/u/Berangere)\
**Post date:** [July 10, 2026, 4:08pm UTC](https://community.hubspot.com/t/bad-refresh-token-error-even-though-app-is-still-installed/151316/8 "2026-07-10T16:08:36Z")

</div>

Hi @activepieces and thanks for your patience!

It sounds like you’re encountering a race condition with concurrent refresh token requests.

HubSpot uses refresh token rotation, so whenever a token is used, a new one is issued and the previous one becomes invalid. If two processes try to refresh at the same time, one will succeed, but the other will get a BAD\_REFRESH\_TOKEN error since the token was just rotated.

Here is what you can try:

It’s a good idea to implement a distributed lock or mutex around your refresh logic to ensure that only one process can refresh a given user’s token at a time. Once you have the lock, double-check if the token was already refreshed before you proceed.

Consider storing tokens per HubSpot account (portal) rather than per user, as recommended in our [OAuth token management guide](https://developers.hubspot.com/docs/api-reference/latest/authentication/manage-oauth-tokens). This can help prevent race conditions if multiple users in the same portal trigger refreshes close together.

Hi @zach_threadint, @SteveHTM and @evaldas do you have additional suggestions, please?

Thanks so much,  
Bérangère

_This post was created with the assistance of AI tools_

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [July 11, 2026, 7:00am UTC](https://community.hubspot.com/t/bad-refresh-token-error-even-though-app-is-still-installed/151316/9 "2026-07-11T07:00:38Z")

</div>

Automatically bumped on July 11, 2026, 7:00am UTC


