/tap-hubspot

Primary LanguagePythonGNU Affero General Public License v3.0AGPL-3.0

tap-hubspot

This is a Singer tap that produces JSON-formatted data following the Singer spec.

This tap:

Configuration

This tap requires a config.json which specifies details regarding OAuth 2.0 authentication, a cutoff date for syncing historical data, and an optional flag which controls collection of anonymous usage metrics. See config.sample.json for an example. You may specify an API key instead of OAuth parameters for development purposes, as detailed below.

To run tap-hubspot with the configuration file, use this command:

› tap-hubspot -c my-config.json

API Key Authentication (for development)

As an alternative to OAuth 2.0 authentication during development, you may specify an API key (HAPIKEY) to authenticate with the HubSpot API. This should be used only for low-volume development work, as the HubSpot API Usage Guidelines specify that integrations should use OAuth for authentication.

To use an API key, include a hapikey configuration variable in your config.json and set it to the value of your HubSpot API key. Any OAuth authentication parameters in your config.json will be ignored if this key is present!

November 2022 notes:

As of Nov 30, 2022, HubSpot deprecates the use of API keys, and instead we will have to use private app access token to authenticate.

https://knowledge.hubspot.com/integrations/how-do-i-get-my-hubspot-api-key

https://developers.hubspot.com/docs/api/migrate-an-api-key-integration-to-a-private-app

We supplied the following tap-config.json:

{
        "pipeline_type": "hubspot",
        "client": "client_name",
        "client_id": "1234567",
        "client_secret": "we_left_it_empty",
        "refresh_token": "hubspot-token",
        "start_date": "2022-11-01",
        "project_id": "project_id",
        "dataset_id": "hubspot",
        "client_service_account_id": "client_service_account_id",
        "redirect_uri": "https://api.hubspot.com/",
        "access_token": "your_private_app_access_token"
}

In order for the sync to run without 403 errors, we gave the private app the following Scopes:

CRM section: Everything - Read (we can iterate on it later - it's possible we gave it too many Read Scopes)

Standard section:

  • automation - Request
  • content - Request

Copyright © 2017 Stitch