Register OAuth2 app

You need to create a developer account first (more about different Hubspot accounts can be found here
Create a new application.
In order to get rid of a warning that your users will see before installing Hubspot module, you have to verify your identity as an app provider.
You can manage the Contact & Support settings.
Or skip for now.
Set the application name, logo, and description.
Go to the Auth tab and copy&paste these values into the Backoffice.
Create Hubspot configuration in the Backoffice.
Go back to Hubspot and set the redirect URL, replace with your domain and keep the suffix /auth/hubspot/callback
Adding scopes.
Hit Save.
One more thing that you will need is the Hubspot, go back to the Apps page and hit the Get HubSpot API key button.
Then copy&paste the generated key and put it into the Backoffice.