---
title: "How to get your HubSpot developer key and OAuth 2 credentials (Legacy Apps)"
img: https://s3.us-east-2.amazonaws.com/unified-article-images/how_to_get_your_hubspot_developer_key_and_oauth_2_credentials_legacy_apps-icon.png
date: 2023-02-12T00:00:00.000Z
tag: Guides
description: "This guide will show you how to retrieve your OAuth 2 credentials and developer API key in HubSpot."
url: "https://docs.unified.to/guides/how_to_get_your_hubspot_developer_key_and_oauth_2_credentials_legacy_apps"
---

# How to get your HubSpot developer key and OAuth 2 credentials (Legacy Apps)
------
_February 12, 2023_

This guide will show you how to retrieve your OAuth 2 credentials and developer API key in HubSpot.


**Note**: HubSpot allows you to create different types of apps - public and private. This guide is about public apps.


## Register a HubSpot Developer Account


First, you'll need to register for a free account on HubSpot if you haven't already.

1. Navigate to the [HubSpot Developers portal](https://developers.hubspot.com/get-started).
2. Click **Create App Developer Account.**
3. Follow the onboarding to complete your account setup.

## Get your HubSpot Developer API key


Developer account API keys are separate from standard API keys - they can be used to manage subscriptions for webhooks and other HubSpot features.

1. Inside the HubSpot developer dashboard, open the sidebar and click [Apps](https://app.hubspot.com/developer/47094559/applications).
2. Click **Get HubSpot API key**.
3. Follow the instructions to create a Developer API key.
4. Click **Show key** to reveal your key. You will need this for the final step.

## Create a HubSpot app


A HubSpot app is a container for your integration settings and is where you'll create and find your OAuth 2 credentials.

1. On the Development page → Legacy Apps→ click **Create Legacy App →** Select **Public App.**

![image.png](https://s3.us-east-2.amazonaws.com/unified-article-images/how_to_get_your_hubspot_developer_key_and_oauth_2_credentials_legacy_apps-0.png)

1. Give your app a name and description.
2. Click on the **Auth** tab.
3. Under **Redirect URLs,** enter: **`https://api.unified.to/oauth/code`**

    ![Screenshot_2024-08-16_at_3.41.50_PM.png](https://s3.us-east-2.amazonaws.com/unified-article-images/how_to_get_your_hubspot_developer_key_and_oauth_2_credentials_legacy_apps-1.png)

4. Under **Scopes,** click **Add new scopes** and select the permissions that your application will require. For example, if your application reads Deals, then select `crm.deal.read`

    ![ba5f5e7e-5c03-49b4-8662-75d3a50f4f01.png](https://s3.us-east-2.amazonaws.com/unified-article-images/how_to_get_your_hubspot_developer_key_and_oauth_2_credentials_legacy_apps-2.png)

5. Click **Create app** to finish setting up your app.

## (optional) Add the `oauth` scope to your app


For apps created before April 2024, the `oauth` scope may be missing from your app's auth settings. Apps created after this date have it on by default. This scope is required for the HubSpot integration to work.

1. Under **Scopes**, click **Add new scope.**
2. Search for **oauth** and select it.
3. Click **Update**.

## Get your OAuth 2 credentials

1. After creating your app, you will be redirected to the App Info tab. Click again on the **Auth** tab.
2. Your unique **Client ID and Client secret** will be displayed. You will need these for the next step.

    ![Screenshot_2024-08-16_at_3.52.29_PM.png](https://s3.us-east-2.amazonaws.com/unified-article-images/how_to_get_your_hubspot_developer_key_and_oauth_2_credentials_legacy_apps-3.png)


## Activate the HubSpot integration in Unified.to with your client ID and secret

1. Open a new tab and navigate to [the HubSpot integration in Unified.to](https://app.unified.to/integrations/hubspot)
2. You will need the following three pieces of information from the earlier steps:
    1. **Client ID**
    2. **Client secret**
    3. **Developer API key** from the developer dashboard
3. Copy and paste these values into their respective fields on the page. Make sure that **Your OAuth 2 credentials** is selected above.

    ![Screenshot_2024-08-16_at_4.19.04_PM.png](https://s3.us-east-2.amazonaws.com/unified-article-images/how_to_get_your_hubspot_developer_key_and_oauth_2_credentials_legacy_apps-4.png)


## See also

- [How to set up your scopes in HubSpot](https://docs.unified.to/guides/how_to_set_up_your_scopes_in_hubspot)
- [How to configure webhooks in HubSpot](https://docs.unified.to/guides/how_to_configure_webhooks_in_hubspot)