How to set HubSpot Enable OAuth 2.0 Option
For the correct work of the HubSpot OAuth 2.0, you need to install the HTTPS protocol.
Firstly, open the HubSop API section and activate the Enable OAuth 2.0 option. OAuth is a secure means of authentication that uses authorization tokens rather than a password to connect your app to a user account.
After you’ve set it up and signed in, you’ll start on the developer account homepage, where you can create your first app or a test account. Click “Create an app” to proceed.
Now you need to create a HubSpot account to install your app. You can create up to 10 test accounts per one developer account. On the homepage of your developer account, click “Create a test account.”HubSpot
Then, click on the “Create app test account” button in the upper right corner.
You’ll see a pop-up where you can give your account a name.
When you’re done, you’ll see that the account is active.
The next step is to return to your website dashboard and copy the Your Redirect URL value from the HubSpot API settings page.
After that, switch over to the HubSpot account and open the Auth tab.
Find the same Redirect URL field and paste the URL you’ve copied from your website. Users must be redirected to this location after granting access to your app.
Find the Scopes field below and choose the Contacts from the drop-down. Don’t forget to click on the “Save” button.
Then, copy the link from the Install URL (OAuth) field in the HubSpot. A user will need this URL to install the app. It’s generated based on the app credentials, redirect URL, and scope configuration found on this page.
Paste this link into the corresponding field on your website.
Return to HubSpot and copy the Client secret. You need it to establish and refresh OAuth authentication.
Open the admin panel again and paste the Client secret into the appropriate field.
Click on the “Save” button. Only after you’ve saved everything, click on the “Authorize” button to log via OAuth 2.0. Afterward, you’ll be redirected to the MyHubSpotApp page.
On the opened page, you’ll see two accounts you’ve created before. Choose the App account and click on the “Choose Account” button.
Probably, you’ll see a warning on the page saying the following: “You’re connecting an unverified app. This app’s details haven’t been reviewed or verified by HubSpot. Make sure you trust the developer before connecting it to your account.” No worries! This warning doesn’t affect anything. It is a way to verify official marketplaces.
The last thing we need to do is to check the HubSpot in the Form. Open the required form, click on the Post Submit Action section on the right panel, choose HubSpot, and click on the pencil icon to edit the action.
Then, enable the Global Settings option. After that, you’ll see that there will be an opportunity to choose between API Key and OAuth 2.0.
After you’ve chosen the type and clicked on the “Send Request” button, you will see the complete list of the HubSpot action settings. These fields are unnecessary for the proper work, but you can add this information if you like. The only required field is Email.
After you are done 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.