Setup Guide
This guide walks you through creating a HubSpot private app and obtaining the access token required to authenticate the HubSpot CRM Contacts connector.
Prerequisites
- A HubSpot account. If you do not have one, sign up for a free account.
Step 1: Create a HubSpot private app
- Log in to your HubSpot account.
- Click the Settings gear icon in the top navigation bar.
- In the left sidebar, navigate to Integrations > Private Apps.
- Click Create a private app.
- On the Basic Info tab, enter a name for your app (e.g.,
Ballerina CRM Contacts) and optionally a description and logo.
Step 2: Configure required scopes
- Click the Scopes tab.
- Under CRM, find and select the following scopes:
crm.objects.contacts.read: required to read contact recordscrm.objects.contacts.write: required to create, update, and delete contacts
- Add any additional scopes needed by your integration (e.g.,
crm.objects.companies.readfor association lookups).
note
Grant only the minimum scopes required by your integration. Avoid enabling broad scopes unless necessary.
Step 3: Create the app and copy the access token
- Click Create app in the top-right corner.
- Review the permissions summary in the confirmation dialog and click Continue creating.
- After the app is created, HubSpot displays a Token dialog with your access token.
- Copy the access token; this is your
tokenvalue for the connector'sBearerTokenConfig.
tip
Store the access token securely. It is shown only once at creation time. If you lose it,
you can regenerate it from the private app's detail page under Auth. Do not commit
it to source control; use Ballerina's configurable feature and a Config.toml file to
supply it at runtime.
Step 4: Rotate or regenerate the access token (if needed)
- Go to Settings > Integrations > Private Apps.
- Click on your private app name.
- Under the Auth tab, click Rotate token to invalidate the existing token and generate a new one.
- Copy and store the new token securely, then update your integration configuration.
warning
Rotating the token immediately invalidates the previous token. Any running integrations using the old token will fail until updated.