March 22, 2026

Updating your HubSpot token

Steps to replace or rotate your HubSpot token when it expires or is revoked.

If your HubSpot Private App token expires, is rotated, or you need to update it for any reason, here's how to do it.

When You Need a New Token

  • Your token was manually revoked in HubSpot
  • You created a new Private App with updated scopes
  • You're switching to a different HubSpot portal
  • You received an authentication error when running HubDeck

Generating a New Token

  1. In HubSpot, go to Settings → Integrations → Private Apps
  2. Find your existing HubDeck app and click into it, or create a new one
  3. Under the Auth tab, click Rotate token (this invalidates the old one immediately)
  4. Copy the new token

Updating the Token in HubDeck

If you're passing the token via the --token flag, simply use the new token value in your next command:

hubdeck audit --token pat-na1-your-new-token

If you're using an environment variable (recommended), update your shell profile or .env file:

HUBSPOT_TOKEN=pat-na1-your-new-token

If you're using HubDeck in a scheduled cron job or CI environment, make sure to update the token wherever it's stored — in your cron environment, GitHub Actions secrets, or wherever you've configured it.

Token Security

Never commit your HubSpot token to a public repository. Use environment variables or a secrets manager. HubDeck only reads CRM data — it never writes to your portal — but the token should still be treated as a credential and rotated if it's ever exposed.

Explore our collection of 200+ Premium Webflow Templates