Setup Guide
This guide walks you through creating a HubSpot developer app and obtaining the OAuth 2.0 credentials and developer API key required to use the HubSpot Automation Actions connector.
Prerequisites
- A HubSpot developer account. If you do not have one, sign up for a free account.
- A HubSpot account with a Professional or higher plan (Marketing Hub, Sales Hub, or Service Hub) to use Automation Actions.
Step 1: Log in to the HubSpot developer portal
Log in to your HubSpot developer account.
Step 2: Create a HubSpot app
- Navigate to Apps in the top navigation bar.
- Select Create app and provide a name and optional description.
Step 3: Configure the OAuth settings
-
Go to the Auth tab of your app.
-
Under Redirect URLs, add your redirect URL.
-
Under Scopes, add the
automationscope using the Add new scopes button. -
Select Save.
Step 4: Get the access token
-
Copy the app installation URL from the Auth tab and open it in a browser.
-
Select your developer test account to authorize the app. An authorization code is displayed in the browser.
-
Exchange the code for tokens:
curl --request POST \
--url https://api.hubapi.com/oauth/v1/token \
--header 'content-type: application/x-www-form-urlencoded' \
--data 'grant_type=authorization_code&code=<CODE>&redirect_uri=<YOUR_REDIRECT_URI>&client_id=<YOUR_CLIENT_ID>&client_secret=<YOUR_CLIENT_SECRET>' -
Copy the
refresh_tokenfrom the response.
Step 5: Get the developer API key
The Definitions, Functions, and Revisions endpoints require a developer API key. Follow the HubSpot developer tools overview to obtain one.
Step 6: Note your app ID
Your App ID is displayed on the app settings page and in the developer portal URL. It is required as a path parameter for most Automation Actions API operations.
Store the client ID, client secret, refresh token, and developer API key securely. Use Ballerina's configurable feature and a Config.toml file to supply them at runtime.





