Skip to content

Reference

HubSpot

Set up HubSpot OAuth for CRM and marketing automation

Connect your users to HubSpot for CRM data, contact management, deal tracking, and marketing automation.

PropertyValue
Provider IDhubspot
CategoryCRM
PKCESupported
Token refreshAutomatic
Redirect URIShown in Developer Portal

Install and authenticate the HubSpot CLI

Follow Create an app to install the HubSpot CLI (v7.6.0 or later), then authenticate with hs init or hs account auth. Apps are now created via the CLI from any standard HubSpot account — the legacy developer-account model was retired in March 2026.

Create a new project

Run hs project create and choose:

  • Distribution: Marketplace or restricted installation
  • Authentication: OAuth (for installation in multiple HubSpot accounts)

Configure OAuth settings

Edit the app’s top-level app-hsmeta.json file and add the Alter callback URL (from the Developer Portal) to the redirectUrls array. Add the required scopes under auth.requiredScopes. Then run hs project upload to deploy the app to HubSpot.

Get credentials

In the HubSpot account, go to Development > Projects, open the project, click the app name, and open the Auth tab. Copy the Client ID and Client secret.

Open the Developer Portal

Go to portal.alterauth.com and navigate to the application.

Add HubSpot provider

Go to OAuth Providers > Add Provider > HubSpot.

Enter credentials

  • Client ID: Paste your HubSpot Client ID
  • Client Secret: Paste your HubSpot Client secret

Select scopes

Choose the scopes the application needs.

Save

Click Save. The provider is now active.

ScopeDescription
crm.objects.contacts.readRead contact records
crm.objects.contacts.writeCreate, update, and delete contacts
crm.objects.companies.readRead company records
crm.objects.companies.writeCreate, update, and delete companies
crm.objects.deals.readRead deal records
crm.objects.deals.writeCreate, update, and delete deals
  • HubSpot enforces granular scopes — request only what the application needs.
  • Access tokens are short-lived (~30 minutes). Alter Vault handles automatic refresh using the refresh token.
  • See the HubSpot OAuth documentation for more details.

Alter policy rules can target these attested operations and families for operation-level and parameter-aware controls.

Operation IDFamiliesMethodProvider path
list_contactsreadGET/crm/v3/objects/contacts
get_contactreadGET/crm/v3/objects/contacts/{contact_id}
search_contactsreadPOST/crm/v3/objects/contacts/search
create_contactwritePOST/crm/v3/objects/contacts
update_contactwritePATCH/crm/v3/objects/contacts/{contact_id}
archive_contactdeleteDELETE/crm/v3/objects/contacts/{contact_id}
list_companiesreadGET/crm/v3/objects/companies
get_companyreadGET/crm/v3/objects/companies/{company_id}
search_companiesreadPOST/crm/v3/objects/companies/search
create_companywritePOST/crm/v3/objects/companies
update_companywritePATCH/crm/v3/objects/companies/{company_id}
archive_companydeleteDELETE/crm/v3/objects/companies/{company_id}
list_dealsreadGET/crm/v3/objects/deals
get_dealreadGET/crm/v3/objects/deals/{deal_id}
search_dealsreadPOST/crm/v3/objects/deals/search
create_dealwritePOST/crm/v3/objects/deals
update_dealwritePATCH/crm/v3/objects/deals/{deal_id}
archive_dealdeleteDELETE/crm/v3/objects/deals/{deal_id}

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.