> ## Documentation Index
> Fetch the complete documentation index at: https://docs.jinba.io/llms.txt
> Use this file to discover all available pages before exploring further.

# HubSpot Credentials

> Set up a HubSpot access token for CRM contact, company, deal, and owner access, and for logging notes and tasks

Configure a HubSpot access token to manage CRM contacts, read deals, companies, and owners, and log notes and tasks from your Jinba Flow workflows.

## Prerequisites

* A HubSpot account with access to the CRM
* Permission to create a service key or a private app in that account

## Creating a HubSpot Access Token

HubSpot issues two kinds of static token that both work here. They produce the same `Bearer` token, so pick whichever your account offers.

<Note>
  **Private apps have moved.** HubSpot reorganised its developer platform and
  private apps now live under **Legacy apps**. Existing private app tokens keep
  working — no sunset has been announced — but new integrations are steered
  towards **service keys**, which are purpose-built for REST API access.
</Note>

### Option A: Service key (recommended)

1. Sign in to HubSpot
2. Navigate to **Development** → **Keys** → **Service keys** (or **Settings** → **Integrations** → **Service Keys**)
3. Click **Create service key** and give it a name (e.g. `Jinba Flow`)
4. Click **Add new scope** and select `crm.objects.contacts.read`, `crm.objects.contacts.write`, `crm.objects.deals.read`, `crm.objects.companies.read`, and `crm.objects.owners.read`
5. Click **Create**, then copy the generated token

<Warning>
  Service keys are currently in public beta. They cannot be used for webhooks or
  UI extensions — REST API requests only, which is all these tools need.
</Warning>

### Option B: Legacy private app

1. Sign in to HubSpot
2. Navigate to **Development** → **Legacy apps** (this is where **Integrations → Private Apps** used to be)
3. Create a legacy app of type **Private**, or open an existing one
4. On the **Scopes** tab, select `crm.objects.contacts.read`, `crm.objects.contacts.write`, `crm.objects.deals.read`, `crm.objects.companies.read`, and `crm.objects.owners.read`
5. Open the **Auth** tab, click **Show token**, and copy it

## Setting Up in Jinba Flow

1. Go to your workspace settings in Jinba Flow
2. Navigate to the **Secrets** section
3. Click **Add secret** and choose **HUBSPOT\_ACCESS\_TOKEN** as the type
4. Enter a name and paste the token into **access\_token**
5. Click **Save**

The saved secret then appears in the **Access Token** dropdown on any HubSpot step.

## Required Scopes

| Scope | Needed for |
| - | - |
| `crm.objects.contacts.read` | `HUBSPOT_GET_CONTACT`, and the lookup half of `HUBSPOT_UPSERT_CONTACT` |
| `crm.objects.contacts.write` | `HUBSPOT_UPSERT_CONTACT`, `HUBSPOT_CREATE_NOTE`, `HUBSPOT_CREATE_TASK` |
| `crm.objects.deals.read` | `HUBSPOT_GET_DEAL`, `HUBSPOT_SEARCH_DEALS` |
| `crm.objects.companies.read` | `HUBSPOT_GET_COMPANY` |
| `crm.objects.owners.read` | `HUBSPOT_GET_OWNER`, `HUBSPOT_LIST_OWNERS` |

<Note>
  HubSpot's Engagements API documents `crm.objects.contacts.write` as the scope
  for creating notes and tasks. If the scope picker in your account offers
  object-specific engagement scopes instead, grant those. We do not grant
  `crm.objects.deals.write`: the note and task tools only associate records with
  a deal and never edit the deal itself, so leaving it off keeps the token unable
  to modify deals. If a note or task create fails with `HTTP 403` even so, check
  which scope the error message names before adding anything.
</Note>

A step that fails with `HTTP 401` or `HTTP 403` almost always means one of these scopes is missing rather than the token being wrong.

## Related Docs

* [HubSpot Tools](/en/pages/tools/productivity/hubspot)
* [HubSpot: legacy private apps](https://developers.hubspot.com/docs/apps/legacy-apps/private-apps/overview)
* [HubSpot: service keys](https://developers.hubspot.com/docs/apps/developer-platform/build-apps/authentication/account-service-keys)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.