# HubSpot

### Obtaining HubSpot access token <a href="#obtaining-hubspot-access-token" id="obtaining-hubspot-access-token"></a>

To obtain your HubSpot access token please do the following

1. Log into your HubSpot account, and click the Gear icon on the top right corner.

<figure><img src="https://1103784913-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiAC0G99SjXjSv2GM5PAE%2Fuploads%2FWVffM3NfZhbNSE7GgOkj%2Fimage.png?alt=media&#x26;token=82344081-d092-4bf9-aa3e-f0d53457050c" alt=""><figcaption></figcaption></figure>

&#x20;

2\. On the left navigation bar, expand “Integrations” and click “Private Apps”

<figure><img src="https://1103784913-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiAC0G99SjXjSv2GM5PAE%2Fuploads%2FWuD9XXGX2UffWo7gvYr9%2Fimage.png?alt=media&#x26;token=8e7ec1d8-412b-448a-bee5-fe9d6fef65f6" alt="" width="268"><figcaption></figcaption></figure>

&#x20;

3\. Follow instructions here

[Migrate an API key integration to a private app](https://developers.hubspot.com/docs/api/migrate-an-api-key-integration-to-a-private-app)

{% hint style="info" %}
The private app must provide with following scopes.&#x20;

```
crm.objects.contacts.read
```

```
crm.objects.contacts.write
```

{% endhint %}

&#x20;

#### Navigate to **Admin** → **Plugins** → **Data Sources.** Click the “*+Activate”* button to Activate the HubSpot Plugin. <a href="#navigate-to-admin-plugins-data-sources.-click-the-activate-button-to-activate-the-hubspot-plugin" id="navigate-to-admin-plugins-data-sources.-click-the-activate-button-to-activate-the-hubspot-plugin"></a>

<figure><img src="https://1103784913-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiAC0G99SjXjSv2GM5PAE%2Fuploads%2FXDYNJpzxkFQWJG8gD1D9%2Fimage.png?alt=media&#x26;token=db3a98a1-b6f9-4e37-90ca-124d0299dab7" alt=""><figcaption></figcaption></figure>

&#x20;

#### Enter the **accessToken** provided by HubSpot in the Activate Plugin popup. Ignore apiKey. <a href="#enter-the-accesstoken-provided-by-hubspot-in-the-activate-plugin-popup.-ignore-apikey" id="enter-the-accesstoken-provided-by-hubspot-in-the-activate-plugin-popup.-ignore-apikey"></a>

<figure><img src="https://1103784913-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiAC0G99SjXjSv2GM5PAE%2Fuploads%2FeZ3mIEPKzceZkSrFZ3GO%2Fimage.png?alt=media&#x26;token=3db22774-57ab-4722-bbdd-ec6bb3095fc8" alt="" width="375"><figcaption></figcaption></figure>

#### Data is exported to HubSpot every 4 hours. The CRM will export Partial and Complete orders to the HubSpot account tied to the access token entered in plugin configuration. <a href="#data-is-exported-to-hubspot-every-4-hours.-the-crm-will-export-partial-and-complete-orders-to-the-hu" id="data-is-exported-to-hubspot-every-4-hours.-the-crm-will-export-partial-and-complete-orders-to-the-hu"></a>
