Skip to content
Docs

Creating a HubSpot OAuth app

This guide is part of the Publicus connection catalog. Once you have the credentials, connect the service and Publicus stores them for you.

Distilled from HubSpot’s own documentation: Create an app, OAuth quickstart, Account types. Retrieved 2026-07-03.

Important: as of 2026-06-23, new legacy public apps can no longer be created — new OAuth apps are built on the developer platform via the HubSpot CLI (legacy public apps overview).

  1. Sign up for a HubSpot account with developer-platform access (legacy developer accounts were folded into standard accounts on 2026-03-09).
  2. Optionally create developer test accounts under Development → Testing → Test Accounts (up to 10; a test account expires after 90 days without API activity).
  3. Install and authenticate the CLI: npm install -g @hubspot/cli@latest, then hs account auth.
  4. Run hs project create and choose App as the base content.
  5. Choose the distribution model (Marketplace vs a specific set of accounts) and the auth type oauth.
  6. Give the app a unique uid in app-hsmeta.json and add the callback URL from the connect form to its OAuth redirect URLs.
  7. Configure scopes on the app’s Auth tab (via hs project open → Project Components → the app → Auth): mark each scope Required, Conditionally required, or Optional.
  8. Run hs project upload to deploy, then copy the Client ID and Client secret from the Auth tab.
  9. The connect flow then redirects users to https://app.hubspot.com/oauth/authorize, and exchanges the returned code at https://api.hubapi.com/oauth/v3/token (all parameters in the form body).

Open Connections under Credentials, choose HubSpot, and pick HubSpot OAuth 2.0 (public apps). Publicus asks for exactly the fields listed above and keeps them in your workspace’s secret storage.

See also: HubSpot in the catalog.

This guide is maintained by Publicus and published under CC BY 4.0.