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
- Creating a HubSpot Developer Account
- Linking HubSpot Account with JetFormBuilder
- Setting the HubSpot as Post Submit Action in Forms
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.
Navigate to the JetFormBuilder > Settings > HubSpot API tab and move the Enable OAuth 2.0 toggle.
Creating a HubSpot Developer Account
Go to the HubSpot website and press the “Create a developer account” button.
Select the “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.
Create the account you need – an app or a test account – by selecting the appropriate tab.
Here, the app was created. Manage the app settings or skip this step (here, this step is skipped).
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).
Go back to your HubSpot account. Press the “Create app” tab.
Navigate to the Auth tab of your HubSpot account.
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).
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.
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.
Then paste these values to your site’s Client Secret and Install URL (OAuth) fields on the JetFormBuilder > Settings > HubSpot API tab.
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.
If the authorization is successful, WordPress will show the following text:
JetFormBuilder HubSpot Action: Your application is successfully authorized via OAuth 2.0
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.
Enable the “Global Settings” option. After that, choose the “API Key” or “OAuth 2.0” authorization type.
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.
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.