HubSpot

ExpandedToggleIcon        Connection Dialog

 

To connect to HubSpot, select Authentication Type and then specify the required parameters or perform a web login depending on the Authentication Type selected.

The following Authentication Type options are available:

OAuth - The OAuth 2.0 authentication through Refresh Token, set by default
Private App - The Private App authentication through the unique Access Token for a specific app
API Key - The API key authentication. For information on how to get a HubSpot API key, visit this HubSpot knowledgebase article. (Pay attention that this type of authentication has been deprecated since 2022).

 

The OAuth 2.0 authentication

 

For the default RefreshToken (OAuth 2.0) authentication, perform the following steps:

1.Click the Sign In button.
2.In the opened login page in the browser, sign in to HubSpot.
3.Select your account to use.
4.In the opened page, click Grant access to approve the access request.

In addition to the required parameters, Advanced connection options may be set for fine-grained connection tuning.

 

The Private App authentication

Private App is a way of accessing specific data from a user's HubSpot account via API. Users may select each private app's permissions on requesting or changing data in the user's HubSpot account. The Access Token is generated uniquely for a specific app.

 

Creating a private App

 

To create and set up the private app, follow the steps below:

 

1. In the HubSpot account, click the Settings icon in the main navigation bar.

2. In the left sidebar menu, navigate to Integrations > Private Apps.

3. Click Create a private app.

 

create-private-app

 

On the Basic info tab, configure the details of your app:

 

4. Enter the app's name.

5. To upload the desired logo for your app, hover over the logo and click the upload icon.

6. Enter a description for your app.

description

7. Go to the Scopes tab and select the checkboxes for each scope, which you desire your private app to have. If you don't know which scopes to choose, it is recommended that you select all available checkboxes. Otherwise, some data may not be available.

select-checkboxes

8. After making all the necessary changes, click Create app.

create-app

9. To proceed, in the Create a new private app dialog that appears, click Continue creating.

continue-creating

10. To obtain the access token and start using API, go to your private app page and click Show token. As a result, the Copy button will be activated allowing you to copy your private app access token for further use.

show-token

Once copied, you can use your private app access token for creating the connection.

 

11. Select Private App from the drop-down menu next to Authentication in the driver configuration dialog box.

 

12. To save the DSN, insert the copied access token of your private app in the corresponding property field and click OK.

 

 

ExpandedToggleIcon        Advanced Connection Options

The following table describes the options that you can include in the Connection String using the Advanced Connection Editor dialog box:

 

Option

Description

Access Token

Specifies the Private App access token. Available when the Private App authentication type is selected.

API Key

Specifies a key that grants access to your HubSpot account.

Associations

Determines whether to retrieve associations between HubSpot objects.

Authentication Type

Determines the authentication type to use - APIKey or RefreshToken (OAuth 2.0).

Client Id

Specifies the Client ID obtained from the app settings in the HubSpot Developer account.

Client Secret

Specifies the Client Secret obtained from the app settings in the HubSpot Developer account.

Column Chunking

Determines whether to split long lists of requested columns into multiple chunks to avoid exceeding HubSpot API request limits.

Connection Lifetime

Specifies the maximum lifetime (in seconds) of a connection. When a connection is returned to the pool, its creation time is compared with the current time, and the connection is destroyed if that time span exceeds the value specified by Connection Lifetime. The default value is 0 (connection always returns to pool).

Connection Timeout

Specifies the length of time (in seconds) to wait for a connection to the server before terminating the attempt and generating an error. The default value is 60.

Default Command Timeout

Specifies the time in seconds to wait while trying to execute a command before terminating the attempt and generating an error. The default value is 60.

Failover Retries

Specifies the number of retry attempts to re-run a command in case when the command failed because of an exception, that indicates that the reason of the failure may be temporary. The default value is 7.

Initialization Command

Specifies a data source-specific command to execute immediately after the connection is established.

Local SQL Engine

Determines whether to enable local SQL processing (enabled by default). Local SQL processing allows performing complex SELECT statements that cannot be directly compiled to HubSpot API calls. In this case all the data from the mentioned cloud objects is queried to the local cache, and then the query is performed against the cache.

If local SQL processing is disabled, only simple SELECT statements that can be directly translated into HubSpot API calls can be used. More complex SELECT statements will fail.

Max Pool Size

Specifies the maximum number of connections allowed in the pool. Setting the Max Pool Size value in the connection string can affect performance. The default value is 100.

Min Pool Size

Specifies the minimum number of connections allowed in the pool. The default value is 0.

NormalizeDbNames

Determines whether database object names are normalized when retrieved from the database.

Persist Security Info

Indicates if security-sensitive information, such as the password, is not returned as part of the connection if the connection is open or has ever been in an open state.

Pooling

Specifies whether, by default, the connection is drawn from the appropriate pool or is created and added to the appropriate pool.

PrivateApp

The authentication type that uses an access token to connect to HubSpot.

Proxy Host

Specifies the host name or IP address of the proxy server.

Proxy Password

Specifies the password for the proxy server account.

Proxy Port

Specifies the port number of the proxy server. The default value is 3128.

Proxy User

Specifies the proxy server account name.

Readonly

Indicates whether the connection is read-only (allows only SELECT statements).

Refresh Token

Stores the OAuth 2.0 refresh token for HubSpot. The value is obtained automatically when you perform Web Login.

Run Once Command

Specifies a command to execute immediately after establishing the connection. Unlike Initialization Command, it is not executed for connections obtained from the connection pool.

Token Server

Specifies the location, a file or a registry key, to store new refresh tokens between sessions. Refresh Token may expire after just 24 hours; when this parameter is set, SSIS Data Flow Components for HubSpot can query new tokens automatically and store them between sessions. For example, "file://D:\temp\oauth_token_1234.txt" or "reg://HKEY_CURRENT_USER\Software\Devart\dotConnect\OAuth_12345"

Use Custom Objects

Determines whether to allow working with HubSpot custom objects.

Use Sensitive Data

Determines whether to allow retrieving sensitive data fields from HubSpot.

UTC Dates

Converts dates to UTC format during import if set to True, and treats the date values entered by the user (in SELECT statements, etc.) as UTC dates when sending them to the data source.