Hi All,

I have added my oauth credentials and the following as scopes:

"forms" and I have also tried "form" however inside of hubspot it shows:

"Couldn’t complete the connection Insufficient scopes were provided. Please contact the integrator."

Comments

onewhocodes created an issue. See original summary.

rondog469’s picture

What are all your scopes? This is a note in the hubspot api docs

Due to the interconnected nature of the tools, both the contacts and forms scopes are required to access the Forms API.

I believe you also need the oauth scope

drupalninja99’s picture

So I was able to get past this step with "oauth forms crm.objects.contacts.write" and checking "Contacts", "Forms" and "Basic OAuth functionality" in app configuration. I haven't fully tested the module end to end but this at least let me connect on this page.

espi.juanjo’s picture

Hi drupalninja99,

I have the same issue. Can you elaborate a bit, as I did exactly what you are saying and still not working. May be I lost some step...

Thanks in advance.

juanjoespi’s picture

Hi.

I finally could do the connection.

This is how I could fix this error and how, imho should be somewhere in the documentation of this module.

1) You need a hubspot developer account
2) You need to have a "normal" account and both have to be accesible by the same email.
3) You indeed need to create a public APP with the scopes mentioned early in this thread
4) You will need to put the developer account ID and the APP keys (public and secret) in the module options
5) Then, when you arrive to the hubspot site and are asked for the account you should connect to, you need to select the normal one (with the form in it), not the developer one.

regards.

branram’s picture

I've tried connecting Version: 3.0.0-alpha1 to Drupal 9, and nothing is allowing me to connect it... I've tried a number of variations of scopes. Normally we just use forms and contacts. Each time, I keep getting the below error message when I attempt to connect to Hubspot.

Couldn’t complete the connection
The redirect_uri doesn't match the client registered redirect_uri. Please contact the app developer.

I'm not sure if it this is some new requirement or what... This is an existing app we've been using for years, connecting it to a new website on D9. I have no idea what the issue is. Has anyone been able to connect this module to Hubspot recently?

branram’s picture

After wasting a better part of two hours trying to figure out the issue with the 3.0.0-alpha1 module... I uninstalled it and went with the 8x alpha. And it connected immediately without issue. Beyond frustrating. What is the point of this version?

  • richgerdes committed 230c6a4 on 3.x
    Issue #3200926 by rondog469, drupalninja99, juanjoespi: Couldn’t...

  • richgerdes committed 61a06d9 on 8.x-1.x
    Issue #3200926 by rondog469, drupalninja99, juanjoespi: Couldn’t...
richgerdes’s picture

@rondog469 and @drupalninja99 thanks for providing support here.

By default the module requires the three scopes `oauth forms contacts`. You should be able to manually type those into the hubspot integration interface. I'ved updated the projects readme with this information and default config to provide this as a requirement. Some projects may require additional scopes if they extend the functionality.

What is the point of this version?

@branram, the different in between 1.x and 3.x was to provide support for the 3.x version of the hubspot api. Version 1.x used the 2.x hubspot api, which doesn't support some features such as adding GDPR consent to form data. While there isn't a ton of extra functionality around these features yet, I made the version change to allow for adding the new dependency and improving the way some of the data was handled when sending data to the api. You should be able to upgrade from 1.x to 3.x without any major issues, however you will need to run database updates, since the configuration structure is changed slightly. The 3.x version flips values and keys, to allow form options to be mapped to more then one input in hubspot, while the 1.x version only allowed for values to be used once. There is an automated db update which should handle this. If you continue to have issues with 3.x, please feel free to open additional support tickets.

richgerdes’s picture

Status: Active » Fixed
rondog469’s picture

@richgerdes thanks for doing that update. I will take some time next week and run through the 3.x-dev version and test it out.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

perfectcu.be’s picture

Version: 8.x-1.x-dev » 3.0.0-alpha4
Assigned: onewhocodes » Unassigned

Using 3.0.0-alpha4 I was unable to connect with the recommended scopes in this thread and the README.md file included with this module. Specifically this:

You will need to provide the `oauth` scope to connect your site and additionally the `forms` and `contacts` scopes if you wish to use the Webform functionality

...Which yields this HubSpot Scope string at the modules config page here /admin/config/services/hubspot:
oauth forms contacts

The following scopes string worked for me with the current hubspot API scopes documentation:

oauth forms crm.objects.contacts.read crm.schemas.contacts.read crm.objects.contacts.write crm.schemas.contacts.write