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 authenticationoauth_2- OAuth 2.0 authentication
API Key Authentication (Private App)
Step 1: Create Private App
- Go to HubSpot Settings
- Navigate to Integrations → Private Apps
- Click Create a private app
- Enter an app name
- Click Create app
Step 2: Configure Scopes
- In your private app settings, go to Scopes tab
- Select the required scopes:
crm.objects.contacts.readcrm.objects.contacts.writecrm.objects.companies.readcrm.objects.companies.writecrm.objects.deals.readcrm.objects.deals.writecrm.objects.tickets.readcrm.objects.tickets.writeengagements.readengagements.write- Add any other scopes your application needs
- Click Save
Step 3: Get API Key
- Go to the Overview tab
- Under API key, click Show to reveal the key
- Copy the API key
- Store it securely
Storing Credentials:
Store the API key with the Corsair CLI:
pnpm corsair setup --hubspot api_key=your-api-keyVerify it was saved:
pnpm corsair auth --plugin=hubspot --credentialsOAuth 2.0 Authentication
Step 1: Create App
- Go to HubSpot Developer Portal
- Click Create app
- Enter your app name and click Create app
Step 2: Configure OAuth Settings
- In your app settings, go to Auth tab
- Under Redirect URLs, click Add
- Add your OAuth redirect URL (e.g.,
https://yourapp.com/auth/hubspot/callback) - Click Save
Step 3: Get Client Credentials
- In the Auth tab, you'll see your Client ID
- Click Show next to Client Secret to reveal it
- Copy the Client ID and Client Secret
- 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=hubspotThe 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
- Go to HubSpot Settings
- Navigate to Integrations → Private Apps
- Select your private app (or create one if needed)
- Go to Webhooks tab
- Click Create subscription
- 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)
- Event type: Select from:
- Click Save
- 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-secretRequired Credentials Summary
| Credential | Required For | Where to Find |
|---|---|---|
| API Key | API Key auth | Settings → Integrations → Private Apps → Overview |
| Client ID | OAuth 2.0 | Developer Portal → App Settings → Auth |
| Client Secret | OAuth 2.0 | Developer Portal → App Settings → Auth |
| Webhook Secret | Webhooks | Settings → Integrations → Private Apps → Webhooks |
For general information about how Corsair handles authentication, see Authentication.