Integration with n8n - Authorization failure

Hi
I try to create a workflow in n8n platform while the Hubspot app (in a developer account) is a trigger. Consistantly I get this error:
Authorization failed because there is a mismatch between the scopes in the install URL and the app’s configured scopes. Please contact the app developer.

Is somebody familiar with this issue?
The following scopes were added according to the documentation provided by n8n:

  • crm.objects.companies.read

  • crm.objects.contacts.read

  • crm.objects.deals.read

    crm.schemas.companies.read

    crm.schemas.contacts.read

  • crm.schemas.deals.read

Hi @IShestakov and welcome, it’s so great to see you here!
Thanks for reaching out to the HubSpot Community!
For reference, here is the “n8n.cloud” documentation.
Here is an article that might be of interest: “Resolve a ‘Request for Integration Permissions’ error”.
Also, here are similar threads that might help you:
- Authorization Failed because the install URL does not match the specified scopes.
- Having this error: mismatch between the scopes in the install URL and the app’s configured scopes.
- Public App Not Connecting to My HubSpot Account in n8n Credentials Setup
I’d love to put you in touch with our Top Experts: Hi @sylvain_tirreau, @Anton, @daveroma and @Fin37 do you have suggestions to help @IShestakov, please?
Have a wonderful day and thanks so much for your help!
Bérangère

Hi,

This usually happens when you’ve first defined scopes and retrieved and/or used the installation URL. You then add scopes to your app, but you’ll launch the same URL as before. What you need to do in this case is copy and paste the installation URL from your app (in dev account) after refreshing everything.

Basically, the message means that the URL you’re launching doesn’t contain all the scopes your app contains.

Great point! It’s easy to overlook that the installation URL needs to reflect the updated scopes. Always a good idea to re-copy the URL after making changes to ensure everything aligns.

I see that this thread contains exact same question as mine , but it wasn’t answered…
Public App Not Connecting to My HubSpot Account in n8n Credentials Setup
Maybe somebody have some idea about the issue?
Thank you

Hey @IShestakov,

the

“Authorization failed because there is a mismatch between the scopes in the install URL and the app’s configured scopes. …” error is pretty self-explanatory - that’s good :slightly_smiling_face:

Check your app for the scopes. For instance, if you have defined a scope in the app in the developer account, your n8n config has to be the same.

My recommendation:

If you got something like this:

const installURL = "https://app-eu1.hubspot.com/oauth/authorize?client_id=SOME_ID&redirect_uri=http://DOMAIN.COM/oauth-callback&scope=SCOPE1%20SCOPE2%20SCOPE3...";

copy the install URI from the app settings and paste it into the app/n8n settings.

If you got something like

const installURL = "https://app-eu1.hubspot.com/oauth/authorize?client_id=S${clientID}&redirect_uri=http://DOMAIN.COM/oauth-callback&scope=${installScopes}";

const clientID = "SOME_ID";
const instalScopes = ...

check the array that’s getting passed to the installURL.

Also an important info:

If you’re creating a public app, you’ll need to “re-verify” the app by HubSpot again, once you change the scopes. This is done to prevent apps become some sort of Trojan horse, where they might request something harmless like source code files first but after sometime the app dev will change it to read/write simply everything and therefore being able to everything portal and harm the app user.

This means:

Creating public apps is fun and apps can highly improve features, but - be thoughtful and responsible. And don’t try to scam people. :slightly_smiling_face:

hope this helps

best,

Anton

Hi,

If you’re encountering an “Authorization Failure” when integrating with n8n, it typically relates to incorrect or missing credentials, token issues, or misconfigured authentication settings in your workflow or API node.

Thanks,Regards

Kamal Hinduja Geneva, Switzerland

Hi @IShestakov , I’ve seen this one come up often with custom OAuth setups.

The root cause is almost always that the install URL you’re using doesn’t perfectly mirror the scopes you’ve set in your HubSpot developer app. Even a single mismatch or missing scope will trigger that “authorization failed” message.

The fix is usually to go back into your dev portal, re-copy the exact install URL after updating scopes, and then paste it fresh into n8n.

HubSpot explains this in their OAuth flow docs here: (Working with OAuth - HubSpot docs)

And also in their guide on scope mismatches here: (Resolve a 'Request for Integration Permissions' error)

One extra check: if you’re building a public app,

HubSpot requires you to re-submit the app for review any time you add scopes. That’s by design, to prevent apps from silently escalating permissions later.

If it’s just a private app, regenerating the install URL and re-authenticating should be enough.

If you’d rather not wrestle with OAuth token refreshes, scope mismatches, or expired headers every time you tweak a sync, there’s another approach.

Stacksync handles all of that under the hood it abstracts authentication, manages token rotations, retries failed requests, and keeps HubSpot data in real-time two-way sync with other systems (databases, ERPs, or workflow tools like n8n).

Instead of piecing things together and debugging scope errors, you get a managed sync layer that just runs reliably, freeing your team from this “dirty plumbing” work

Hope this clears it up.