How to Set HubSpot Enable 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 connects HubSpot’s free CRM platform and manages user contacts via the Post Submit Actions of the JetFormBuilder forms.

NOTE

OAuth is an authorization protocol that allows users to access third-party data sources while keeping their credentials safe using 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 of the HubSpot API tab is legacy and is used for the older API keys. Therefore, for newly created API keys, the Enable OAuth 2.0 toggle should be activated.

enabling the oauth 2.0 toggle in the jetformbuilder settings

Create a HubSpot Developer Account

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

the hubspot site

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

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

developer home tab of the hubspot account

Next, insert the developer’s account name in the newly appeared Public app name field (here, we type the “MyHubSpotAppTEST” text). Also, you can fill out non-required fields.

inserting the developer’s account name

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

Go back to your developer’s account and click the Auth tab. Scroll the page down and paste the copied link to the Redirect URLs field.

pasting the copied link to the hubspot account

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

the scopes section of the hubspot account

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

adding the required scopes

Also, if needed, unroll other tabs (Conditionally required scopes, Optional scopes, etc.) to pick other scopes.

Press the “Create app” button.

After that, the fields of the Auth tab will be filled out automatically.

automatically filled out fields of the Auth tab

Scroll this tab down and copy data from the Client secret and Sample install URL (OAuth) fields. 

the client secret and sample install URL (OAuth) fields 

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

inserting data to the jetformbuilder setting fields

Finally, press the “Save” button.

Create a Test Account

NOTE

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

In this stage, return to the Developer account and move to the Test accounts tab. Here, click the “Create developer test account” button.

creating a test account

Here, in the newly appeared Create a developer test account pop-up, insert the account’s name in the Account name field. In this case, we type the “Developer test account 1” text. Once completed, press the “Create” button.

the create a developer test account pop-up

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

the developer test account tab

Then, you will be redirected to the Create dashboard from scratch tab. Here, click the “+ New dashboard” button.

creating new dashboard for test account

Insert the dashboard’s name in the corresponding field and leave the “Allow everyone to view and edit” option selected.

adding the dashboard name 

If everything is done correctly, you will be redirected to the new dashboard.

the new test dashboard tab

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

the authorization to the hubspot account

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.

the user hubspot accounts enlisted

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

connecting to the hubspot 

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.

the 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 “HubSpot” action and click the corresponding button.

adding the hubspot post submit action

Next, enable the Use Global Settings toggle in the Edit HubSpot pop-up. 

enabling the global settings toggle

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. 

enabling the global settings toggle

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 the Contacts list of your HubSpot account.

the edit hubspot pop-up 

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.