The driver supports API key authentication. It allows you to authenticate to the REST endpoints using an API key. To learn how to generate an API key for your account, refer to the HubSpot documentation.

To configure the driver to use the API key authentication:

  • Set the AuthenticationMethod property to URLParameter.
  • Set the APIKey property to specify the API key.

The following examples show the connection information required to establish a session using the API key authentication.

Connection URL

Connection conn = DriverManager.getConnection
  ("jdbc:datadirect:hubspot:
    AuthenticationMethod=URLParameter;
    APIKey=12a3bCD-EfGh4Ijk-Lgd8g-44tk3c527831;");

Data Source

HubSpotDataSource mds = new HubSpotDataSource();
mds.setDescription("My HubSpot Data Source");
mds.AuthenticationMethod("URLParameter");
mds.APIKey("12a3bCD-EfGh4Ijk-Lgd8g-44tk3c527831");