OAuth 2.0 Overview

Authentication for your integration starts with creating an app in a HubSpot Developer account. You'll use the Client ID and Client Secret from that app to initiate the OAuth handshake between HubSpot and your integration.

Note: If you're just getting started building on HubSpot, we strongly recommend checking out the OAuth 2 Quickstart Guide. This guide will quickly get you up and running with a working example app.

Scopes

OAuth 2.0 allows a user to authorize your app to work with specific tools in their HubSpot account, designated by the authorization scopes you set. You can find more details about the available scopes and the tools they provide access to here.

Connecting your app to HubSpot using OAuth 2.0

There are 4 main steps to connecting your integration to a customers HubSpot account using OAuth:

Note: Your app will not appear as a connected app in the integration settings unless you complete the first two of these steps. You must generate the refresh token and initial access token to have the app appear as connected.

Build the authentication URL for your app, and send the HubSpot user to that URL. The user will be presented with a screen that allows them to grant access to your integration. If a user has multiple HubSpot accounts, they'll have the option to choose which account they're granting access for.