HubSpot API Key
HubSpot has retired their HubSpot API (HAPI) Key connection method in favor of a more secure Application based method. HAPI Key methods has been officially disconnected in November 2022. This article will walk through how to create a Public or Private App in HubSpot and use that app to create a Service on M-Bridge, in addition to updating an existing HubSpot service. It is recommended to create a public app over a private app as the public app can be updated with future integration enhancements.
How to Connect to HubSpot via Public App
Kantata OX now has a public app available in HubSpot. This public app generates a secure, OAuth2 connection between the integration platform and your HubSpot environment
- Log in to Hubspot.
- In another tab in the same browser, log in to M-Bridge.
- In the upper-right corner of M-Bridge, click Accounts and then Services from the drop-down that appears. The Services page opens.
- Click Add Service and then select HubSpot from the drop-down list.
Note: You may see a separate HubSpot option. That option is for creating a private app, which is explained below. It recommended to create a public app over a private app.
- Give your service a short, descriptive Name.
- Ensure the Global for Account? checkbox is checked and then click the the green Create button. You're redirected to a creation confirmation screen.
- Click the green Confirm button to continue creating the HubSpot service.
- If your HubSpot user is linked to more than one HubSpot account, select the desired account. You're redirected back to the Integration Platform's Services page and your new HubSpot service appears under the Account Services list.
- Click the Test button to the right of your newly created service to confirm that the connection was set up successfully.
Note: After setting up your HubSpot service, continue configuring the integration by setting up your mapping tables and configuring your HubSpot scenarios. If you already have an existing HubSpot service, you must switch your integration to use the new public service by going to Account > Settings and then selecting the public service from the HubSpot field.
How to Create a Private App in HubSpot
The private app is used to define the scopes (permissions) for the integration and generate the access token needed to create an M-Bridge service and begin syncing data.
- Log in to Hubspot.
- In the menu bar at the top of the page, click the Settings icon.
- On the Settings page, click the Integrations option in the left navigation bar, and then click Private Apps.
- On the Private apps page, click the Create a private app button.
- In the Basic Info tab, enter a Name and Description.
- Select the required scopes:
- crm.objects.companies.read
- crm.objects.contacts.read
- crm.objects.deals.write
- crm.objects.deals.read
- crm.objects.line_items.write
- crm.objects.line_items.read
- e-commerce
Note: The e-commerce scope can be found under the Standard scope section. - Click the Create app button in the top-right corner of the page.
- In the confirmation modal that appears, click the Continue creating button.
- The private app is created and a confirmation modal appears. To copy the token, click Show Token and then click Copy.
How to Create a Private HubSpot Service on M-Bridge
- In the upper-right corner of M-Bridge, click Accounts and then Services from the drop-down that appears. The Services page opens.
- On the Services page, click Add Service and then select HubSpot (deprecated) from the drop-down menu. New fields appear below the drop-down. Note: If you don’t see HubSpot (deprecated) in the Services list, you may need to enable the integration from the M-Bridge homepage. If you don't see the integration on the M-Bridge homepage, please contact Customer Success as the HubSpot integration may not have been provisioned for your account.
- Enter a Name and the Access Token.
- Check the Global for Account box on the right and then click the Create button to create your service.
- Your newly created HubSpot service appears in the table below. Click the Test button to confirm the service was created successfully. Note: If your service doesn't test successfully, please edit your scenario and then copy and paste your Access token from the HubSpot Private App.
How to Update an Existing HubSpot Service to Use a Private App
If you already have an existing HubSpot Integration on M-Bridge, you can update your current service to use the private app Access Token instead of the now deprecated API Key.
- In the upper-right corner of M-Bridge, click Accounts and then Services from the drop-down that appears. The Services page opens.
- On the Services page, click the Edit button for your HubSpot service.
- If desired, rename your existing service to indicate that it is using the private app connection method (e.g. HubSpot Private App).
- Paste in the new Access Token that you copied from the private app in Hubspot. Note: If both the API Key and the Access Token fields are filled out, the integration will ignore the API Key and only use the Access Token to connect to HubSpot.
- Your updated HubSpot service appears in the table below. Click the Test button to confirm the service was updated successfully. Note: If your service does not test successfully, please edit your scenario and then copy and paste your Access Token from the HubSpot private app again.