Corsair
PluginsHubSpot

Get Credentials

Step-by-step instructions for obtaining HubSpot credentials

This guide walks you through obtaining all required credentials for the HubSpot plugin.

Authentication Methods

The HubSpot plugin supports both API key and OAuth 2.0 authentication methods.

  • api_key - Private App API key authentication
  • oauth_2 - OAuth 2.0 authentication

API Key Authentication (Private App)

Step 1: Create Private App

  1. Go to HubSpot Settings
  2. Navigate to IntegrationsPrivate Apps
  3. Click Create a private app
  4. Enter an app name
  5. Click Create app

Step 2: Configure Scopes

  1. In your private app settings, go to Scopes tab
  2. Select the required scopes:
    • crm.objects.contacts.read
    • crm.objects.contacts.write
    • crm.objects.companies.read
    • crm.objects.companies.write
    • crm.objects.deals.read
    • crm.objects.deals.write
    • crm.objects.tickets.read
    • crm.objects.tickets.write
    • engagements.read
    • engagements.write
    • Add any other scopes your application needs
  3. Click Save

Step 3: Get API Key

  1. Go to the Overview tab
  2. Under API key, click Show to reveal the key
  3. Copy the API key
  4. Store it securely

Storing Credentials:

Store the API key with the Corsair CLI:

pnpm corsair setup --hubspot api_key=your-api-key

Verify it was saved:

pnpm corsair auth --plugin=hubspot --credentials

OAuth 2.0 Authentication

Step 1: Create App

  1. Go to HubSpot Developer Portal
  2. Click Create app
  3. Enter your app name and click Create app

Step 2: Configure OAuth Settings

  1. In your app settings, go to Auth tab
  2. Under Redirect URLs, click Add
  3. Add your OAuth redirect URL (e.g., https://yourapp.com/auth/hubspot/callback)
  4. Click Save

Step 3: Get Client Credentials

  1. In the Auth tab, you'll see your Client ID
  2. Click Show next to Client Secret to reveal it
  3. Copy the Client ID and Client Secret
  4. Store these securely

Storing Credentials:

Store your OAuth app credentials, then start the flow:

pnpm corsair setup --hubspot client_id=your-client-id client_secret=your-client-secret
pnpm corsair auth --plugin=hubspot

The CLI will print an authorization URL — open it in a browser. Once you approve, tokens are saved automatically.

Webhook Secret

Step 1: Create Webhook Subscription

  1. Go to HubSpot Settings
  2. Navigate to IntegrationsPrivate Apps
  3. Select your private app (or create one if needed)
  4. Go to Webhooks tab
  5. Click Create subscription
  6. Configure:
    • Event type: Select from:
      • Contact created/updated/deleted
      • Company created/updated/deleted
      • Deal created/updated/deleted
      • Ticket created/updated/deleted
    • Webhook URL: Your webhook endpoint (e.g., https://yourapp.com/api/webhook)
  7. Click Save
  8. If a webhook secret is provided, copy it and store securely

Storing Credentials:

Store the webhook secret with the CLI:

pnpm corsair setup --hubspot webhook_signature=your-webhook-secret

Required Credentials Summary

CredentialRequired ForWhere to Find
API KeyAPI Key authSettings → Integrations → Private Apps → Overview
Client IDOAuth 2.0Developer Portal → App Settings → Auth
Client SecretOAuth 2.0Developer Portal → App Settings → Auth
Webhook SecretWebhooksSettings → Integrations → Private Apps → Webhooks

For general information about how Corsair handles authentication, see Authentication.