How to Set HubSpot: Enable the OAuth 2.0 Option

The HubSpot Pro Addon is a mailing list add-on that extends the HubSpot OAuth 2.0 functionality. The add-on integrates with HubSpot’s free CRM platform and manages user contacts via the Post Submit Actions of JetFormBuilder forms.

NOTE

OAuth is an authorization protocol that allows users to access third-party data sources while keeping their credentials secure by issuing authorization tokens.

Install and Activate the Add-on

Install and activate the add-on. Navigate to the WordPress Dashboard > JetFormBuilder > Addons tab, select the HubSpot Integration add-on, and activate its license.

the hubspot add-on installed and activated

Also, you can install and activate this add-on as any WordPress plugin. For more details, read the JetFormBuilder WordPress Plugin Installation tutorial.

Navigate to the WordPress Dashboard > JetFormBuilder > Settings > HubSpot API tab and activate the Enable OAuth 2.0 toggle.

NOTE

The API key field on the HubSpot API tab is legacy and used for older API keys. Therefore, for newly created API keys, the Enable OAuth 2.0 toggle should be activated.

enable oauth 2.0 in jetformbuilder settings

Create a HubSpot Developer Account

Go to the HubSpot website and press the “Create developer account” button. 

hubspot site front page

Otherwise, you can log in to the previously created account.

Once logged in, move to the Developer home section and press the “Create app” button.

building a public app tab

Next, enter the developer’s account name in the newly appearing Public app name field (here, we type “MyHubSpotAppTEST”). You can also fill out non-required fields.

public name is set

Return to your website dashboard and copy the Your Redirect URL link from the JetFormBuilder > Settings > HubSpot API tab of your site (here, https://*****************************=jet_fb_hubspot_oauth).

the redirect URL field of the jetformbuilder settings

After that, go back to the MyHubSpotApp tab of your HubSpot Developers account and switch to the Auth tab.

Scroll down here and insert the copied link into the Redirect URLs field.

filling out the redirect URLs field

Move to the Scopes section. Here, press the “+ Add new scope” button and select the Required scopes in addition to the “oauth” scope set by default.

selecting scopes while completing the app-settings

This way, we add the following Required scopes

crm.objects.companies.read

crm.objects.companies.write

crm.objects.contacts.read

crm.objects.contacts.write

crm.objects.owners.read

oauth

Click the “Update” button.

configuring the auth settings

Click the “Create app” button.

After that, the fields in the Auth tab will be automatically filled in. Now, copy the data from the Client secret and Sample install URL (OAuth) fields.

auth settings completed

Return to the WordPress Dashboard > JetFormBuilder > Settings > HubSpot API tab and paste this data into the corresponding fields.

paste client secret to the jfb settings

Finally, press the “Save” button.

Create a Test Account

NOTE

This step aims to test the account in “sandbox” mode. Therefore, it is not required, e.g., if you have a paid account, the test one is not necessary.

At this stage, return to the Developer account and open the Testing section, and select the Test Accounts tab. Here, click the “Create developer test account” button.

create test account

In the newly appearing Create a developer test account pop-up, enter the account name in the Account name field. In this case, we type “Developer test account 1”. Once completed, press the “Create” button.

set up the test account

After that, you will be redirected to the Developer test accounts dashboard. Click the created account name.

developer test account dashboard

The new Create dashboard from scratch tab will be opened. Here, click the “+ New dashboard” button.

create dashboard from scratch tab

In the newly opened pop-up, insert the dashboard’s name in the corresponding field and leave the “Allow everyone to view and edit” option selected.

create new dashboard popup

Click the “Create dashboard” button to be redirected to a new page. 

new test dashboard created

Return to the WordPress Dashboard > JetFormBuilder > Settings > HubSpot API tab. Here, press the “Authorize” button.

click the authorize button in the jetformbuilder settings

After that, you will be redirected to the Connecting Your Account to HubSpot window. 

Choose the needed account. Here, we select the “Developer test account 1”, which works in the “sandbox” mode, but you can choose the required one. Click the “Choose Account” button.

choosing an account for HubSpot

Then, scroll down the page with the listed accounts and press the “Connect app” button.

connect app popup

As a result, the “Authorize” text in the WordPress Dashboard > JetFormBuilder > Settings > HubSpot API tab will be changed to the “You are already logged in” one.

authorization text in the jetformbuilder settings

Set HubSpot as the Post Submit Action in Forms

Open the required form, move to the Post Submit Actions section on the right panel, and click the “New Action” button. 

Then, in the newly appeared Add new action pop-up, choose the “HubSpot” action and click the corresponding button.

select the hubspot action

Next, enable the Use Global Settings toggle in the Edit HubSpot pop-up. After that, choose the “API Key” or “OAuth 2.0” AUTHORIZATION TYPE (here, we select the “OAuth 2.0” option) and click the “Send Request” button.

edit hubspot action

After you’ve selected the type and clicked the “Send Request” button, you will see the complete list of the action settings. Filling in most fields here is optional for the proper functionality. The only required field is Email.

the edit hubspot pop-up 

After setting the “HubSpot” Post Submit Action, press the “Update” button. When the user submits the form, the new subscriber will appear in your HubSpot account’s Contacts list.

Click the “Publish” button once you are ready with the settings.

That’s all about connecting the HubSpotPro add-on for JetFormBuilder with the free HubSpot CRM platform and managing user contacts via the Post Submit Actions of the JetFormBuilder forms for WordPress.