How to Set HubSpot Enable OAuth 2.0 Option

The HubSpot – JetFormBuilder Pro Addon extends the HubSpot OAuth 2.0 functionality, connecting the HubSpot’s free CRM platform and managing user contacts via the Post Submit Actions of the JetFormBuilder forms. 

OAuth is an authorization protocol allowing users to access third-party data sources while keeping their credentials safe using authorization tokens.

Setting the JetFormBuilder Pro Addon

Install and activate the JetFormBuilder Pro Addon. Navigate to the JetFormBuilder > Addons tab, select the HubSpot addon, and activate its license.

addon license activation

Navigate to the JetFormBuilder > Settings > HubSpot API tab and move the Enable OAuth 2.0 toggle.

enable oauth toggle activation

Creating a HubSpot Developer Account

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

create an oauth developer account

Select the “Create App Developer account” button.

create app developer account button

Create a free developer account using your email: enter your email, the verification code sent, your password, name, and job role, and give your developer account a unique name.

After you’ve set these data up and signed in, you’ll start on the developer account homepage, where you can create your first app or a test account.

Specify the account type or skip this step.

hubspot app development

Create the account you need – an app or a test account – by selecting the appropriate tab.

creation of hubspot application

Here, the app was created. Manage the app settings or skip this step (here, this step is skipped).

manage app settings window

Then, you will be redirected to your HubSpot account.

Linking HubSpot Account with JetFormBuilder

Return to your website dashboard and copy the Your Redirect URL link from the JetFormBuilder > Settings > HubSpot API tab of your site (here, https://findero.local/wp-admin/admin.php?action=jet_fb_hubspot_oauth).

site hubspot api settings page

Go back to your HubSpot account. Press the “Create app” tab.

hubspot account page

Navigate to the Auth tab of your HubSpot account.

auth tab of the hubspot

Paste the copied link to the Redirect URLs field of the Auth tab (here, https://findero.local/wp-admin/admin.php?action=jet_fb_hubspot_oauth).

hubspot api settings

Scroll the Auth tab of the HubSpot API site and locate the Find a scope field. Unroll the tabs (CMS, CRM, Settings, and Standard) to pick the settings you need. Press the “Save changes” button.

hubspot api settings

Scroll down the Auth tab of the HubSpot API site and copy the code/link in the Client secret and Install URL (OAuth) fields on the HubSpot site.

app credentials page
NOTE

The Install URL (OAuth) field link is available after selecting at least one required scope from the CMS, CRM, Settings, and Standard tabs.

Then paste these values to your site’s Client Secret and Install URL (OAuth) fields on the JetFormBuilder > Settings > HubSpot API tab.

hubspot api site fields

Then click the “Authorize” button to log in via OAuth 2.0. Afterward, you’ll be redirected to the MyHubSpotApp page with the proposition to set the two-factor authentication.

Skip the proposition or set the authentication for further account usage.

If you have two or more HubSpot accounts, specify the necessary one from the list.

selecting necessary hubspot account

If the authorization is successful, WordPress will show the following text:

JetFormBuilder HubSpot Action: Your application is successfully authorized via OAuth 2.0

selecting necessary hubspot account

Setting the HubSpot as Post Submit Action in Forms

Open the required form, click the Post Submit Action section on the right panel, choose “HubSpot,” and click the pencil icon to edit the action.

hubspot post submit actions

Enable the “Global Settings” option. After that, choose the “API Key” or “OAuth 2.0” authorization type.

oauth setting of post submit action

Press the “Sent Request” button. After you’ve chosen the type and clicked the “Send Request” button, you will see the complete list of the “HubSpot” action settings. Filling in most fields here is unnecessary for the proper work. The only required field is Email.

jetformbuilder hubspot action global settings

After setting the HubSpot action, press the “Update” button. When the user submits the form, the new subscriber will appear in the Contacts list of your HubSpot account.

That’s all about adding the HubSpot OAuth 2.0 functionality via Post Submit Actions of the JetFormBuilder forms.