CRM & Sales

HubSpot OAuth Integration

Connect HubSpot to your application without building and maintaining the OAuth flow.

Each user connects their own HubSpot account through your OAuth app. Pathfix manages the authorization flow, stores and refreshes their tokens, and authenticates the requests your application makes to HubSpot's APIs. Which CRM records you read or write, and when, is defined by your code.

Start building with Pathfix Read the setup guide

What can you build?

Examples of what the HubSpot API supports. Your application implements the logic; Pathfix authenticates the requests.

  • Sync contacts and companies

    Create and update contact and company records in a user's HubSpot account from data in your app.

  • Create deals from product activity

    Open or update deals when something happens in your product, such as a trial starting or a plan changing.

  • Search before you write

    Use HubSpot's CRM search to find existing records and avoid creating duplicates.

  • Keep records connected

    Associate contacts with companies and deals so related records stay linked in HubSpot.

How Pathfix helps

  • 01

    OAuth authorization

    Pathfix runs the authorization flow with your HubSpot OAuth app, so users approve access on HubSpot’s own consent screen.

  • 02

    Token management

    Each user’s access and refresh tokens are stored by Pathfix rather than in your application.

  • 03

    Token refresh

    Where HubSpot issues refresh tokens, Pathfix refreshes them as they expire, so connections keep working after the first authorization.

  • 04

    Authenticated API passthrough

    Your application sends HubSpot API requests through Pathfix, which adds the connected user’s credentials before passing them on to HubSpot.

You own the HubSpot OAuth application and its credentials, and your code implements the API logic.

Passthrough endpoint for HubSpotPOST https://labs.pathfix.com/oauth/method/hubspot/call

How to get started

  1. 1

    Create an app in your HubSpot developer account

    The app gives your application its own OAuth credentials.

  2. 2

    Copy your Client ID and Client Secret

    These belong to your HubSpot app. Pathfix uses them to run the OAuth flow as your application.

  3. 3

    Choose your scopes

    Check the permission requirements for each endpoint in HubSpot's API reference and request only the scopes you need.

  4. 4

    Add the credentials in Pathfix

    In your Pathfix account, add an application, select HubSpot from the providers and enter the Client ID and Client Secret.

  5. 5

    Let your users authorize

    Add the connect step to your app. Each user signs in to HubSpot and approves the scopes you requested.

  6. 6

    Call the HubSpot API

    Send requests through the Pathfix passthrough API using the provider reference hubspot.

The Pathfix setup guide for HubSpot walks through the app settings step by step.

Documentation

More CRM & Sales integrations

Your HubSpot OAuth app. Your users.

Start building with Pathfix Browse all integrations