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).
- Sign up for a HubSpot account with developer-platform access (legacy developer accounts were folded into standard accounts on 2026-03-09).
- Optionally create developer test accounts under Development → Testing → Test Accounts (up to 10; a test account expires after 90 days without API activity).
- Install and authenticate the CLI:
npm install -g @hubspot/cli@latest, thenhs account auth. - Run
hs project createand choose App as the base content. - Choose the distribution model (Marketplace vs a specific set of accounts) and the auth type oauth.
- Give the app a unique
uidinapp-hsmeta.jsonand add the callback URL from the connect form to its OAuth redirect URLs. - 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. - Run
hs project uploadto deploy, then copy the Client ID and Client secret from the Auth tab. - The connect flow then redirects users to
https://app.hubspot.com/oauth/authorize, and exchanges the returnedcodeathttps://api.hubapi.com/oauth/v3/token(all parameters in the form body).
Connect it to Publicus
Section titled “Connect it to Publicus”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.