HubSpot Marketing Hub is the marketing automation product within the HubSpot platform — it powers forms, email campaigns, landing pages, marketing events, social posts, contact lists, marketing analytics, and workflows. Integrating HubSpot Marketing with Frontegg allows your application to read and write Marketing Hub data — including aggregate email and campaign analytics, and workflow enrollments — on behalf of your users through OAuth 2.0 authentication.
Prerequisites
Prerequisites
- A HubSpot account with developer access
- A HubSpot Marketing Hub subscription with access to the features you plan to use (forms, email, landing pages, social, etc.)
Go to developers.hubspot.com and sign in with your HubSpot account.

Once signed in, you will be in your HubSpot developer account. In the left sidebar, navigate to Development → Legacy Apps. This page lists all existing applications in your account.
Click Create legacy app in the top right corner.

In the Create Legacy App dialog that appears, select Public (for apps that can be installed by any HubSpot account).

On the App Info tab, enter a name for your application in the Public app name field (for example, "Frontegg Marketing Integration"). This name appears in HubSpot tools when users install your app.

Click the Auth tab to open the authentication configuration page. The App credentials, Redirect URLs, and Scopes sections all live here.

Scroll down to the Redirect URLs section. Enter your Frontegg redirect URL:
https://YOUR_MCP_GATEWAY_URL/integration-callback
Scroll down to the Scopes section and click Add new scope. The scope picker dialog opens, grouped by category (CRM, CMS, Automation, Marketing, etc.). Use the search field to find specific scopes quickly.

Select the following scopes:
| Scope | Description |
|---|---|
forms | Read and write HubSpot forms |
content | Read and write marketing content — emails, landing pages, and campaigns |
social | Read and write social media posts and channels |
crm.lists.read | Read contact lists |
crm.lists.write | Create and update contact lists |
crm.objects.contacts.read | Read contact records (used for list members and email recipients) |
crm.objects.contacts.write | Create and update contact records |
crm.objects.marketing_events.read | Read marketing events (webinars, conferences, etc.) and event participation breakdowns |
crm.objects.marketing_events.write | Create, update, and complete marketing events |
marketing-email | Read aggregate marketing-email statistics (sends, opens, clicks, bounces, unsubscribes) and time-bucketed histograms |
marketing.campaigns.read | Read aggregate campaign performance metrics across associated assets |
marketing.campaigns.revenue.read | Read campaign revenue attribution data (required alongside marketing.campaigns.read for revenue reports) |
automation | List and read workflows, and enroll or unenroll contacts in workflows |
Minimum required scopes
Minimum required scopes
For basic Marketing Hub functionality, you need at least forms, content, and crm.objects.contacts.read. Add marketing-email and marketing.campaigns.read for reporting and analytics, marketing.campaigns.revenue.read for revenue attribution, and automation for workflow enrollments.
After selecting all required scopes, click Update. The selected scopes appear under Required scopes on the Auth page, alongside the always-required oauth scope.

Click Create app at the bottom of the page. Once the app is created, the App credentials section at the top of the Auth page displays your credentials:
- Client ID — Your app's unique identifier used to initiate OAuth.
- Client secret — Click Show to reveal the secret. Used to exchange authorization codes for access tokens.
Copy both values and store them securely.
Keep your credentials secure
Keep your credentials secure
Never share or commit your Client secret to version control.

Once you have obtained your Client ID and Client secret from the steps above, enter them in the integration configuration page of the Frontegg portal:
- Open the Frontegg portal and navigate to [ENVIRONMENT] → Connectors → HubSpot Marketing.
- Enter the Client ID and Client secret in the corresponding fields.
- Select the required scopes.
- Click Save.