HubSpot is an extensive CRM and allows you to connect to it via various authentication methods. API Keys is one of the ways to authenticate yourself to gain read and write access to all the data on your HubSpot account.
In the previous part of this article, we discussed the aspects of HubSpot’s announcement of the discontinuation of API keys from the platform and the inability of API keys to work from November 30, 2022.
In this article, we will look into creating custom objects and authenticating them using private apps that are the preferred authentication method after API keys. Along with that, we will demonstrate how to migrate from API keys to private apps using two examples.
HubSpot allows three authentication methods for the objects, such as API Keys, OAuth, and Private apps. In other words, if we consider HubSpot as a computer, then there are three methods to authenticate an object as its user to utilize the functionalities offered by it. In a similar way, HubSpot allows authentication via three ways to access the HubSpot functionalities.
However, API keys are not going to function from November 30, 2022, and HubSpot has already discontinued the creation of new API keys from July 15, 2022. This leaves us OAuth and Private apps. OAuth is out of the scope of this article, but you can study it on HubSpot documentation.
Private apps are access tokens used for authentication. These hold the static access token in the Authorization HTTP header and require the creation of a separate authentication key for each of the integrations.
Now that you know what private apps and custom objects are, let's take a look at the step-by-step process of creating private apps. The steps are:
This section will define the steps of creating custom objects from private apps instead of API keys. We will be covering the steps with the help of an example for better understanding.
You have created your private app in the previous section. Now, you need to call the API endpoint for the creation of a custom object. We will be using Postman for this purpose as the tool allows you to make API calls without setting up your application.
Custom objects are the additional data objects you can create to ensure that it aligns with your data requirements. HubSpot allows you to add any sort of object with the required fields for storing data.
The steps are as follows:
Create a JSON schema based on the list. For our example object “car” it would look like
In this section, we will discuss how to migrate your custom code workflow actions that are currently working on API keys to private apps. The steps are as follows:
Private apps instill more security into the infrastructure in comparison to the API keys as they allow you to control the scope and a separate token is created for each of the integrations.
This article covered the steps of creating custom objects using private apps with an example. Along with that, we also looked into the steps of migrating the custom code workflows from the usage of API keys to that of private apps.
The discontinuation of API keys is soon approaching. If you still feel that you need further assistance, Learner.ai is here to help by ensuring a smooth migration process from API keys to private apps.
Eager to learn more? Book a free consultation.