Skip to main content

OAuth 2.0 for Hubspot

This section describes the steps to configure Alteryx Analytics Cloud (AAC) to integrate with your HubSpot deployment using OAuth 2.0 to authenticate.

Create OAuth 2.0 Client for HubSpot

  1. Create a developer account in HubSpot.

  2. Log in to your account and navigate to manage apps.

  3. In the public app name field, enter the OAuth client name.

  4. Set your redirect URLs:

    https://ayxpreview.alteryxcloud.com/oauth2/callback

  5. For Scopes, select Read or Write for each scope to which you want to provide access. This determines the data the driver has access to retrieve. Refer to the OAuthRequiredScopes and OAuthOptionalScopes properties for recommended scopes to select.

    Note

    If any additional scopes are added to the client apart from the default ones for OAuthRequiredScopes or OAuthOptionalScopes, you need to provide all the required scopes as ConnectionString Properties like

    OAuthRequiredScopes=“<Space separated list of scopes>;OAuthOptionalScopes=“<Space separated list of scopes>”.

    For more information on OAuthRequiredScopes and OAuthOptionalScopes properties for recommended scopes to select, see:

  6. To save the changes, click Save changes.

  7. After the app is created, copy the Client ID and Client Secret values to a text file.

Register the OAuth 2.0 Client

After the HubSpot connected app is created, you must create an OAuth 2.0 client in AAC, which is used to integrate with the OAuth 2.0 connected app that you created above.

Note

You must create one OAuth 2.0 client in AAC for each HubSpot connected app that you wish to use.

Steps:

  1. Login to AAC as a workspace administrator.

  2. In the lefthand menu, select User menu > Admin console > OAuth2.0 Clients.

  3. In the OAuth2.0 Clients page, click Register OAuth2.0 Client.

  4. Specify the new client. Apply the following values:

    Setting

    Description

    Type

    Set to HubSpot

    Name

    Display name for the OAuth 2.0 client in AAC.

    Client ID

    Set this value to the Client ID created above.

    Client Secret

    Set this value to the Client Secret value created above.

    Authorization URL

    Set this value to the following:

    https://app.hubspot.com/oauth/authorize?

    Token URL

    Set this value to the following:

    https://api.hubapi.com/oauth/v1/token

    Scopes

    Provide the required scopes.

    Access Token Expires In

    Set this value to 1800000.

    Refresh Token Expires In

    Set this value to 0.

  5. To save your OAuth 2.0 client, click Create.

For more information, see Create OAuth2 Client.

Create HubSpot Connection

After you have created the two OAuth 2.0 client references, you can create a connection to your HubSpot data.

Note

You must create a separate connection for each OAuth 2.0 client that is available in AAC.

For more information, see HubSpot Connections.