---
title: HubSpot connector
description: The HubSpot connector lets you synchronize HubSpot contacts and companies with managed objects in an IDM repository.
component: openicf
page_id: openicf:connector-reference:hubspot
canonical_url: https://docs.pingidentity.com/openicf/connector-reference/hubspot.html
section_ids:
  install_the_hubspot_connector: Install the HubSpot connector
  configure_the_hubspot_connector: Configure the HubSpot connector
  test_the_hubspot_connector: Test the HubSpot connector
  hubspot_remote_connector: HubSpot remote connector
  config-connection-pooling-hubspot: Configure connection pooling
  hubspot-implementation-specifics: Implementation specifics
  hubspot-connector-proxy: Using the HubSpot connector With a proxy server
  implemented-interfaces-org-forgerock-openicf-connectors-hubspot-HubspotConnector-1.5.20.34: OpenICF Interfaces Implemented by the Hubspot Connector
  config-properties-org-forgerock-openicf-connectors-hubspot-HubspotConnector-1.5.20.34: Hubspot Connector Configuration
  basic-configuration-properties-org-forgerock-openicf-connectors-hubspot-HubspotConnector-1.5.20.34: Basic Configuration Properties
  advanced-connection-properties-org-forgerock-openicf-connectors-hubspot-HubspotConnector-1.5.20.34: Advanced Connection Properties
---

# HubSpot connector

The HubSpot connector lets you synchronize HubSpot contacts and companies with managed objects in an IDM repository.

This topic describes how to install and configure the HubSpot connector, and how to perform basic tests to ensure that it's running correctly.

For a complete example that includes the configuration required to synchronize users with this connector, refer to [Synchronize data between IDM and HubSpot](https://docs.pingidentity.com/pingidm/8/samples-guide/sync-with-hubspot.html).

Before you configure the HubSpot connector, you must have a client app in HubSpot, with the corresponding `clientID`, `clientSecret` and `refreshToken`.

## Install the HubSpot connector

|   |                                                                                                                                                                                                                                                                                                 |
| - | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|   | To check for an Advanced Identity Cloud application for this connector, refer to:- [Application management](https://docs.pingidentity.com/pingoneaic/latest/app-management/applications.html)

- [App catalog](https://docs.pingidentity.com/pingoneaic/latest/app-management/app-catalog.html) |

You can download any connector from [Backstage](https://backstage.forgerock.com/downloads/browse/idm/featured/connectors), but some are included in the default deployment for Advanced Identity Cloud, IDM, or RCS. When using an included connector, you can skip installing it and move directly to configuration.

**Connector included in default deployment**

| Connector               | IDM                     | RCS                     |
| ----------------------- | ----------------------- | ----------------------- |
| [HubSpot](hubspot.html) | [icon: times, set=fa]No | [icon: times, set=fa]No |

Download the connector .jar file from [Backstage](https://backstage.forgerock.com/downloads/browse/idm/featured/connectors).

* If you're running the connector locally, place it in the `/path/to/openidm/connectors` directory, for example:

  ```
  mv ~/Downloads/hubspot-connector-1.5.20.34.jar /path/to/openidm/connectors/
  ```

* If you're using a remote connector server (RCS), place it in the `/path/to/openicf/connectors` directory on the RCS.

## Configure the HubSpot connector

Create a connector configuration using the IDM admin UI:

1. From the navigation bar, click Configure > Connectors.

2. On the Connectors page, click New Connector.

3. On the New Connector page, type a Connector Name.

4. From the Connector Type list, select HubSpot Connector - 1.5.20.34.

5. Complete the Base Connector Details and any applicable Additional Options.

   |   |                                                                                                                      |
   | - | -------------------------------------------------------------------------------------------------------------------- |
   |   | For a list of all configuration properties, refer to [HubSpot Connector Configuration](#hubspot-config-prop-ezLink). |

6. Click Save.

When your connector is configured correctly, the connector displays as Active in the admin UI.

Refer to [this procedure](configure-connector.html#connector-wiz-REST) to create a connector configuration over REST.

Alternatively, configure the connector with a configuration file. IDM provides a sample connector configuration file in the `/path/to/openidm/samples/example-configurations/provisioners` directory. Copy this sample file (`provisioner.openicf-hubspot.json`) to your project's `conf` directory.

Adjust the `configurationProperties` to match your HubSpot application details. You *must* provide a `clientId`, `clientSecret`, and `refreshToken`. Other properties are optional:

```json
"configurationProperties" : {
    "clientId" : "daa533ae-xxxx-xxxx-xxxx-6e66d84e6448",
    "clientSecret" : "c598a365-xxxx-xxxx-xxxx-24b32b6ae04d",
    "refreshToken" : "f37e1132-xxxx-xxxx-xxxx-4b9e724ce4a0",
    "acceptSelfSignedCertificates" : true,
    "readSchema" : "true",
    "disableHostNameVerifier" : false,
    "maximumConnections" : "10",
    "permitsPerSecond" : "10",
    "httpProxyHost" : null,
    "httpProxyPort" : null
}
```

IDM encrypts the `clientSecret` and `refreshToken` as soon as the connector is enabled.

### Test the HubSpot connector

Test that the configuration is correct by running the following command:

```
curl \
--header "X-OpenIDM-Username: openidm-admin" \
--header "X-OpenIDM-Password: openidm-admin" \
--header "Accept-API-Version: resource=1.0" \
--request POST \
"http://localhost:8080/openidm/system/hubspot?_action=test"
[
  {
    "name": "hubspot",
    "enabled": true,
    "config": "config/provisioner.openicf/hubspot",
    "connectorRef": {
      "bundleVersion": "[1.5.0.0,1.6.0.0)",
      "bundleName": "org.forgerock.openicf.connectors.hubspot-connector",
      "connectorName": "org.forgerock.openicf.connectors.hubspot.HubspotConnector"
    },
    "displayName": "Hubspot Connector",
    "objectTypes": [
      "company",
      "contactProperties",
      "__ALL__",
      "companyProperties",
      "contact"
    ],
    "ok": true
  }
]
```

A status of `"ok": true` indicates that the connector can connect to HubSpot.

### HubSpot remote connector

If you want to run this connector outside of PingOne Advanced Identity Cloud or IDM, you can configure the HubSpot connector as a remote connector. Java Connectors installed remotely on a Java Connector Server function identically to those bundled locally within PingOne Advanced Identity Cloud or installed locally on IDM.

You can download the HubSpot connector [from here](https://backstage.forgerock.com/downloads/browse/idm/all/productId:idm-connectors).

Refer to [Remote connectors](remote-connector.html) for configuring the HubSpot remote connector.

### Configure connection pooling

The HubSpot connector supports [HTTP pooling](pooling.html#http-pooling), which can substantially improve the performance of the connector. Learn more about the basic connection pooling configuration and different pooling mechanisms described in [Connection pooling configuration](pooling.html).

## Implementation specifics

For PATCH requests, a connector can potentially add, remove, or replace an attribute value. The HubSpot connector does not implement the add or remove operations, so a PATCH request always replaces the entire attribute value with the new value.

## Using the HubSpot connector With a proxy server

If the IDM server is hosted behind a firewall and requests to the resource provider are routed through a proxy, you must specify the proxy host and port in the connector configuration.

To specify the proxy server details, set the `httpProxyHost`, and `httpProxyPort` properties in the connector configuration. For example:

```json
"configurationProperties": {
    ...
    "httpProxyHost": "myproxy.home.com",
    "httpProxyPort": 8080,
    ...
}
```

## OpenICF Interfaces Implemented by the Hubspot Connector

The Hubspot Connector implements the following OpenICF interfaces. For additional details, see [ICF interfaces](interfaces.html):

* Create

  Creates an object and its `uid`.

* Delete

  Deletes an object, referenced by its `uid`.

* Schema

  Describes the object types, operations, and options that the connector supports.

* Script on Connector

  Enables an application to run a script in the context of the connector.

  Any script that runs on the connector has the following characteristics:

  * The script runs in the same execution environment as the connector and has access to all the classes to which the connector has access.

  * The script has access to a `connector` variable that is equivalent to an initialized instance of the connector. At a minimum, the script can access the connector configuration.

  * The script has access to any script arguments passed in by the application.

* Search

  Searches the target resource for all objects that match the specified object class and filter.

* Test

  Tests the connector configuration.

  Testing a configuration checks all elements of the environment that are referred to by the configuration are available. For example, the connector might make a physical connection to a host that is specified in the configuration to verify that it exists and that the credentials that are specified in the configuration are valid.

  This operation might need to connect to a resource, and, as such, might take some time. Do not invoke this operation too often, such as before every provisioning operation. The test operation is not intended to check that the connector is alive (that is, that its physical connection to the resource has not timed out).

  You can invoke the test operation before a connector configuration has been validated.

* Update

  Updates (modifies or replaces) objects on a target resource.

[]()

## Hubspot Connector Configuration

The Hubspot Connector has the following configurable properties:

### Basic Configuration Properties

| Property                                       | Type            | Default | Encrypted(1)             | Required(2)               |
| ---------------------------------------------- | --------------- | ------- | ------------------------ | ------------------------- |
| `clientId`                                     | `String`        | `null`  |                          | [icon: check, set=fas]Yes |
| Client ID of the OAuth application in Hubspot. |                 |         |                          |                           |
| `clientSecret`                                 | `GuardedString` | `null`  | [icon: lock, set=fas]Yes | [icon: check, set=fas]Yes |
| Client Secret for the preceding Client ID.     |                 |         |                          |                           |
| `refreshToken`                                 | `GuardedString` | `null`  | [icon: lock, set=fas]Yes | [icon: check, set=fas]Yes |
| Refresh token for application in Hubspot.      |                 |         |                          |                           |

(1) Whether the property value is considered confidential, and is therefore encrypted in IDM.

(2) A list of operations in this column indicates that the property is required for those operations.

### Advanced Connection Properties

| Property                                                                                      | Type      | Default | Encrypted(1) | Required(2)               |
| --------------------------------------------------------------------------------------------- | --------- | ------- | ------------ | ------------------------- |
| `acceptSelfSignedCertificates`                                                                | `boolean` | `false` |              | [icon: check, set=fas]Yes |
| Specifies whether the HubSpot server should accept self-signed certificates.                  |           |         |              |                           |
| `readSchema`                                                                                  | `Boolean` | `false` |              | [icon: check, set=fas]Yes |
| If false, the Hubspot connector provides a default schema for Hubspot contacts and companies. |           |         |              |                           |
| `disableHostNameVerifier`                                                                     | `boolean` | `false` |              | [icon: check, set=fas]Yes |
| If hostname verification is disabled, the HubSpot server accepts connections from any host.   |           |         |              |                           |
| `maximumConnections`                                                                          | `Integer` | `10`    |              | [icon: check, set=fas]Yes |
| Maximum number of simultaneous connections to HubSpot.                                        |           |         |              |                           |
| `permitsPerSecond`                                                                            | `Integer` | `10`    |              | [icon: check, set=fas]Yes |
| Number of Api calls to be made per second.                                                    |           |         |              |                           |
| `httpProxyHost`                                                                               | `String`  | `null`  |              | [icon: check, set=fas]Yes |
| Specifies the Hostname if an HTTP proxy is used between the connector and HubSpot.            |           |         |              |                           |
| `httpProxyPort`                                                                               | `Integer` | `null`  |              | [icon: check, set=fas]Yes |
| Specifies the Port number if an HTTP proxy is used between the connector and HubSpot.         |           |         |              |                           |

(1) Whether the property value is considered confidential, and is therefore encrypted in IDM.

(2) A list of operations in this column indicates that the property is required for those operations.
