Skip to main content
Ensure you have Admin privileges for your HubSpot account to create and configure OAuth applications.

Set up a HubSpot OAuth app

Create a new app with the HubSpot CLI, or use an existing legacy public app. HubSpot no longer lets you create legacy public apps.

1

Open or create the app

Sign in to your HubSpot account.

  • CLI app: Run npm install -g @hubspot/cli@latest, then hs account auth. Run hs project create and choose App, HubSpot Marketplace and OAuth.
  • Legacy app: In the left sidebar, click More > Development > Legacy Apps, then open your public app.
HubSpot left sidebar with the More menu expanded and Development highlighted at the bottom of the list
2

Set the callback URL

Add the Callback URL from your Connector Profile as a redirect URL.

  • CLI app: In src/app/app-hsmeta.json, add it to config.auth.redirectUrls.
  • Legacy app: On the app’s Auth tab, enter it in Redirect URL, then click Save.
3

Add the scopes

Enables actions: Add Asset To Campaign, Batch Create Associations, Batch Create Companies, Batch Create Contacts, Batch Create Deals, Batch Read Associations, Batch Update Companies, Batch Update Contacts, Batch Update Deals, Clone Marketing Email, Create Association, Create CRM Object, Create Campaign, Create Company, Create Contact, Create Custom Object Association, Create Custom Object Schema, Create Deal, Create Deal Pipeline, Create Deal Pipeline Stage, Create Marketing Email, Create Ticket, Delete Association, Delete CRM Object, Delete Campaign, Delete Company, Delete Contact, Delete Custom Object Association, Delete Custom Object Schema, Delete Deal, Delete Marketing Email, Delete Ticket, Get CRM Object, Get Campaign, Get Company, Get Contact, Get Custom Object Schema, Get Deal, Get Deal Pipeline, Get Deal Pipeline Stage, Get Form, Get Marketing Email, Get Object Properties, Get Owner, Get Ticket, Get Ticket Pipeline, Get Ticket Pipeline Stage, Get Unified Group, Get Unified Role, Get Unified User, List Associations, List CRM Objects, List Campaign Assets, List Campaigns, List Companies, List Contacts, List Custom Object Schemas, List Deal Pipeline Stages, List Deal Pipelines, List Deals, List Form Submissions, List Forms, List Marketing Emails, List Owners, List Ticket Pipeline Stages, List Ticket Pipelines, List Tickets, List Unified Groups, List Unified Roles, List Unified Users, Publish Marketing Email, Remove Asset From Campaign, Search Companies, Search Contacts, Search Deals, Search Tickets, Update CRM Object, Update Campaign, Update Company, Update Contact, Update Custom Object Schema, Update Deal, Update Deal Pipeline, Update Deal Pipeline Stage, Update Marketing Email, Update Ticket

Make oauth the only required scope, so HubSpot accounts without access to some tools can still connect. Add every other scope listed as optional. See HubSpot scopes.

  • CLI app: Set config.auth.requiredScopes to ["oauth"], and add the other scopes to config.auth.optionalScopes.
  • Legacy app: On the Auth tab under Scopes, click Add new scope. Select oauth and mark it as Required, then select each of the other scopes and mark it as Optional.
4

Save your changes

Save the callback URL and scopes to the app.

  • CLI app: Run hs project upload from the project directory.
  • Legacy app: Click Update.
5

Copy credentials

Copy the Client ID and Client Secret into your Connector Profile.

  • CLI app: Run hs project open, click your app under Project Components, and open the Auth tab. They’re under Client credentials.
  • Legacy app: They’re on the app’s Auth tab. Click Show to reveal the secret.

Create the StackOne Connector Profile

1

Create a Connector Profile

Enable the connector and create a Connector Profile in your project. See Setup Connector Profile.
2

Link an Account

Once the Connector Profile is created, continue to link an account.