This string includes the properties used to connect with OAuth 2.0 refresh token.

jdbc:datadirect:hubspot:AuthenticationMethod=OAuth2;
ClientID=client_id;ClientSecret=client_secret;
RefreshToken=refresh_token;Scope=scope;[property=value[;...]];

where:

client_id
specifies the client ID key for your application when authenticating with OAuth 2.0.
client_secret
specifies the client secret for your application when authenticating with OAuth 2.0.

Important: The client secret is a confidential value used to authenticate the application to the server. To prevent unauthorized access, this value must be securely maintained.

refresh_token
specifies the refresh token used to either request a new access token or renew an expired access token.

Important: The refresh token is a confidential value used to authenticate to the server. To prevent unauthorized access, this value must be securely maintained.

scope

(optional) specifies a space-separated list of OAuth scopes that limit the permissions granted by an access token.

property=value

specifies connection property settings. Multiple properties are separated by a semi-colon.

The following example connection string includes the properties required for connecting with the OAuth 2.0 refresh token grant.

Connection conn = DriverManager.getConnection
  ("jdbc:datadirect:hubspot:AuthenticationMethod=oauth2;
    ClientID=ab123c45-def6-7g89-gh1i-m2345no67891;
    ClientSecret=12a3=bCD/EfGh4Ijk+Lm5P67qR8s=//TuV+WXy1Zabcd;
    RefreshToken=12a3=bCD/EfGh4Ijk+Lgd8g-44tk3c527831;");