Establishing a Connection
Configure a Connection Profile
From the CData ribbon, click Get Data and select From HubDB connection/s to launch the CData Query window. To setup a new connection, you will have to click the New HubDB Connection button. Here you can set the connection settings, test the connection, and save the connection profile.
Connecting to HubDB
There are two authentication methods available for connecting to HubDB data source: OAuth Authentication with a public HubSpot application and authentication with a Private application token.
OAuth
AuthScheme must be set to OAuth in all OAuth flows. The following OAuth flows assume you have done so.
Desktop Applications
You must create a custom OAuth application to connect. See Creating a Custom OAuth App a procedure.Get and Refresh the OAuth Access Token
After setting the following, you are ready to connect:
- OAuthClientId: Set this to the client Id assigned when you registered your application.
- OAuthClientSecret: Set this to the client secret assigned when you registered your application.
- CallbackURL: Set this to the redirect URI defined when you registered your application.
Private App
To connect using a Hubspot private application token, set the AuthScheme property to PrivateApp.
You can generate a private application token by following the steps below:
- In your HubDB account, click the settings icon (the gear) in the main navigation bar.
- In the left sidebar menu, navigate to Integrations > Private Apps.
- Click Create private app.
- On the Basic Info tab, configure the details of your application (name, logo, and description).
- On the Scopes tab, select Read or Write for each scope you want your private application to be able to access.
- A minimum of hubdb and crm.objects.owners.read is required to access tables.
- After you are done configuring your application, click Create app in the top right.
- Review the info about your application's access token, click Continue creating, and then Show token.
- Click Copy to copy the private application token.
To connect, set PrivateAppToken to the private application token you retrieved.
Connection Properties
The Connection properties describe the various options that can be used to establish a connection.
Managing Connections
After successfully authenticating to HubDB you will be able to customize the data you are importing. To learn more about this, see Managing Connections.
See Also
- Querying Data: Use the data selection wizard to pull data into a spreadsheet. You can also configure scheduled data refresh here.
- Using the Excel Add-In: Find other ways to interact with HubDB data, such as using the available CData Excel Functions.