Authorization failed because the code challenge parameter is missing. PKCE is required for this authorization request. Please contact the app developer.
I’m using developer api key hubspot node to use as trigger, i use mcp auth app and developer key and still got this error
HubSpot now strictly enforces PKCE (Proof Key for Code Exchange) for OAuth2 Public Apps. Because n8n’s standard OAuth2 client does not send the required code_challenge parameter for this specific flow, HubSpot rejects it. Furthermore, while you mentioned having a “developer API key,” the error confirms that n8n is currently configured to use the OAuth2 authentication method instead of your API key/Access Token.
Here is how to fix this by switching to the recommended server-to-server authentication method:
Verify/Create a HubSpot Private App:
Go to your HubSpot Developer Portal.
Navigate to Settings > Private Apps (do not use Public Apps for n8n).
Create a new Private App (or use an existing one) and ensure you grant the exact scopes required for your trigger (e.g., crm.objects.contacts.read, tickets, etc.).
Go to the Access token tab and copy the token.
Reconfigure the n8n Credential:
Open your n8n workflow and click on the HubSpot Trigger or Node.
In the Credential for HubSpot API dropdown, click Create New (or edit the existing one).
Crucial Step: Look for the Authentication (or Auth Type) dropdown. Change it from OAuth2 to Private App (in some older n8n versions, this is labeled as API Key or Access Token).
Paste your copied Access Token into the Access Token / API Key field.
Click Save and test the node.
If you are using a Webhook-based trigger (like “Contact Created”), ensure your HubSpot Private App has the webhooks scope enabled, otherwise n8n cannot register the webhook URL with HubSpot.
Does that help?
Have you tried updating to the latest stable version of n8n?
Hi @patpat Welcome!
MCP Auth Apps are only for HubSpot’s remote MCP server at mcp.hubspot.com, and that flow mandates OAuth 2.1 with PKCE, so that app’s client ID can’t be used for the trigger’s connect. The HubSpot Trigger needs a normal public app created in a developer account, paired with the developer API key from that same account.
At developers.hubspot.com open Apps, copy the HubSpot API key into Developer API Key in n8n, then Create app and take App ID, Client ID and Client Secret from its Auth tab. Add the oauth scope plus the read scopes for the objects you trigger on, and paste n8n’s OAuth Redirect URL into the app’s Redirect URL field before you save. HubSpot credentials | Nodes | n8n Docs
the problem is when i create private legacy app, there’s no app id there and in n8n when using trigger there’s no other option to choose to put credentials other than this, my n8n version is 2.32.7
the problem is when i create private legacy app, there’s no app id there and in n8n when using trigger there’s no other option to choose to put credentials other than this, my n8n version is 2.32.7
The App ID doesn’t exist on private apps, and the app type that has one can’t be created anymore. HubSpot disabled creation of legacy public apps on June 23, 2026, and the App ID plus Developer API Key pair that the HubSpot Trigger credential expects only comes from that app type, so on 2.32.7 there is no way to fill those fields unless your developer account already had a legacy public app from before that date.
Poll instead of triggering. In HubSpot go to Development > Keys > Service Keys, create a service key with the read scopes you need, and paste it into an n8n HubSpot credential as the App Token. Then run a Schedule Trigger into the HubSpot node with “Get recently created/updated” for contacts, or “Get recently modified” for deals and companies.