Skip to content

HubSpot Query authentication guide

This is a step-by-step guide to acquiring HubSpot credentials and authorizing the HubSpot Query component.

The HubSpot Query component can use OAuth or Private App Token for third-party authentication. This guide will only explain the Private App Token method. Read OAuth for details of the OAuth method.

Authorizing the HubSpot Query component requires four steps:

  1. Obtain a Private App Token from the HubSpot portal.
  2. Create a secret to store the Private App Token.
  3. Add a secret definition to the Your projects menu.
  4. Use the Private App Token property drop-down in the HubSpot Query component to select the secret holding the token you have created.

Obtain a Private App Token

  1. Open HubSpot Accounts in a browser and enter valid login credentials to continue.
  2. On the HubSpot Accounts dashboard, click the name of the account you will use to obtain the token.

    Note

    • This must be an app developer account.
    • You may be asked to provide additional login credentials to open the account.
  3. On the HubSpot Developer Home page, click Manage apps.

  4. On the Apps page, click Get HubSpot API key in the top-right of the page.
  5. In the Developer App key dialog, click Show key.
  6. Copy the contents of the revealed API key field, as this HubSpot Private App Token will be required when creating the secret.
  7. Close the dialog and exit the portal.

Scopes

Your app must have certain scopes to collect data from HubSpot. Check that your app has the following scopes. If not, click the Auth tab for your app and then, in the Scopes section, click Add new scope to add each scope. For more information, read HubSpot's Scopes documentation.

  • crm.lists.read
  • crm.lists.write
  • crm.objects.companies.read
  • crm.objects.companies.write
  • crm.objects.contacts.read
  • crm.objects.contacts.write
  • crm.objects.deals.read
  • crm.objects.deals.write
  • crm.objects.owners.read
  • crm.schemas.deals.read
  • crm.schemas.deals.write
  • crm.schemas.companies.read
  • crm.schemas.companies.write
  • crm.schemas.contacts.read
  • crm.schemas.contacts.write

Create a secret

You must create a secret to store your HubSpot Private App Token. How this secret is stored depends on your Data Productivity Cloud deployment model:

AWS Secrets Manager

  1. Log in to the AWS account that houses your agent. This must be in the same AWS Region as the agent selected when the project was created.
  2. In the search bar search for Secrets Manager to access the Secrets page.
  3. Click Store a new secret.
  4. Select Other type of secret and create a Key/value pair with the following details:
    • Key: Enter a label you will use to identify the token.
    • Value: Enter the HubSpot Private App Token code you copied earlier.
  5. Click Next and on the next page enter a Secret name. This is the name that will appear in the Secret definitions list in Your projects.
  6. The remainder of the details aren't needed, so click Next and Next again, then Store to complete the creation of the secret.

Azure Key Vault

  1. Log in to the Azure account that houses your agent. This must be in the same Azure Region as the agent selected when the project was created.
  2. Click Key vaults and click the name of the key vault you want to reference. If there is only one, then this will be the [Default] key vault configured in the agent.
  3. Click Objects and then click Secrets.
  4. Click + Generate/Import.
  5. On the Create a secret screen enter the following:
    • Upload options: Select Manual.
    • Name: Type a name for the secret. The secret name must be unique within a key vault. For more information on naming, read Key Vault objects, identifiers, and versioning.
    • Secret value: Enter the HubSpot Private App Token code you copied earlier.
  6. Click Create.

Add a secret definition

Follow the steps in Secrets and secret definitions.


Return to Designer

  1. Return to the HubSpot Query component in Designer.
  2. Click into the Private App Token property.
  3. Select your new secret definition representing your HubSpot Private App Token.
  4. Click Save.

Got feedback or spotted something we can improve?

We'd love to hear from you. Join the conversation in the Documentation forum!