# HubSpot Private App Setup

This guide explains how to generate API credentials for integrating HubSpot with Dapta. The process consists of two steps:

1. **Creating a Private App in HubSpot** to generate an API key.
2. **Creating a Credential in Dapta** and using it in the **Flow Builder**.

***

### 📌 **Prerequisites**

Before starting, make sure you have:

✅ **Admin access** to a HubSpot account.\
✅ **Permissions to create a Private App in HubSpot.**\
✅ **Access to Dapta with integration privileges and the Flow Builder module.**

***

### 🛠 **Step 1: Creating a Private App in HubSpot**

To integrate HubSpot with Dapta, you need to generate an API key by creating a **Private App** in HubSpot. Follow these steps:

#### 1️⃣ **Access the Private Apps Section**

1. Log in to your **HubSpot account**.
2. Click the **settings icon (⚙️)** in the top navigation bar.
3. In the left menu, navigate to **Integrations > Private Apps**.
4. Click **"Create a private app"**.\ <br>

   <figure><img src="https://3835013762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCy5rSNtQmtqYCGzJlNEB%2Fuploads%2Fgit-blob-ad95d5459ae30b900183a6307e9957c199463026%2Fhs_setting_privata_app.png?alt=media" alt=""><figcaption></figcaption></figure>

#### 2️⃣ **Set Up the Private App**

1. In the **Basic Info** section:

   * Set the **App Name** to `Dapta Integration`.
   * (Optional) Add a **description** such as: *Allows Dapta to access HubSpot data for automation.*

   <div data-full-width="true"><figure><img src="https://3835013762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCy5rSNtQmtqYCGzJlNEB%2Fuploads%2Fgit-blob-86a45d9592e56c52e5ca1e48f791eceff75138bc%2FScreenshot%202025-02-06%20at%207.42.28%E2%80%AFPM.png?alt=media" alt=""><figcaption></figcaption></figure></div>
2. Navigate to the **Scopes** tab.

   <figure><img src="https://3835013762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCy5rSNtQmtqYCGzJlNEB%2Fuploads%2Fgit-blob-ccca9e11b8107fcd8fecd96a2c810fe949568193%2FScreenshot%202025-02-06%20at%207.46.02%E2%80%AFPM.png?alt=media" alt=""><figcaption></figcaption></figure>
3. Enable the following permissions:

   \
   Dapta requires specific scopes to ensure seamless integration with HubSpot. Below is the list of **recommended scopes** that enable essential CRM functionalities such as managing contacts, companies, and deals.\
   \
   ✅ crm.objects.contacts.read\
   ✅ crm.objects.contacts.write\
   ✅ crm.objects.companies.read\
   ✅ crm.objects.companies.write\
   ✅ crm.objects.deals.read\
   ✅ crm.objects.deals.write\
   ✅ crm.objects.owners.read\
   ✅ crm.lists.read\
   ✅ crm.lists.write\
   ✅ crm.schemas.contacts.write\
   ✅ crm.schemas.companies.write\
   ✅ crm.schemas.deals.write\
   ✅ crm.schemas.contacts.read\
   ✅ crm.schemas.companies.read\
   ✅ crm.schemas.deals.read\
   \
   **Note:** Depending on your specific use case, you may need to enable additional scopes to meet your integration needs.<br>
4. Once you've finished configuring the settings, go to the top of the page and click **Create app**.<br>

   <figure><img src="https://3835013762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCy5rSNtQmtqYCGzJlNEB%2Fuploads%2Fgit-blob-ce1d3c41eec37d5bec56c3521d7f4093a7ad891f%2FHubSpot%20Espan%CC%83ol%20Image.png?alt=media" alt=""><figcaption></figcaption></figure>
5. **Retrieve the API Key**<br>

   After creating the app, HubSpot will generate an **API key**.\
   **Copy this key immediately**, as HubSpot will not display it again after this step.\
   Store the API key securely, as it will be required in Dapta for authentication.<br>

   <figure><img src="https://3835013762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCy5rSNtQmtqYCGzJlNEB%2Fuploads%2Fgit-blob-5b8e1e1e7f649232b05cd17e0bbb85c843c46e71%2FHubSpot%20Espan%CC%83ol%20Image.png?alt=media" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
🚀 Now that you have your HubSpot API key, you can move on to **Step 2: Creating a Credential in Dapta**.
{% endhint %}
