Hubspot Oauth2 redirect URL issue

Describe the issue/error/question

Hey folks, I’m trying to set up the Husbot trigger but facing an issue in the connection stage.

  1. Created the Trigger node in n8n
  2. Created the public app in the Hubspot
  3. Passed the App ID, Client ID and Client Secret to n8n
  4. Filled in the n8n.prod.anl.specha.co/rest/oauth2-credential/callback as the Redirect URL in Hubspot.
    The install URL (OAuth) in Hubspot reflected the changes and been changed to https://app.hubspot.com/oauth/authorize?client_id=e8e07c69-b18d-44a6-891a-3201cb6a7254&redirect_uri=https://n8n.prod.anl.specha.co/rest/oauth2-credential/callback&scope=oauth%20forms%20tickets%20crm.lists.read%20crm.objects.contacts.read%20crm.objects.contacts.write%20crm.objects.marketing_events.read%20crm.objects.marketing_events.write%20crm.schemas.custom.read%20crm.objects.custom.read%20crm.objects.custom.write%20crm.objects.companies.write%20crm.schemas.contacts.read%20crm.objects.feedback_submissions.read%20crm.lists.write%20crm.objects.companies.read%20crm.objects.deals.read%20crm.objects.deals.write%20crm.schemas.companies.read%20crm.schemas.companies.write%20crm.schemas.contacts.write%20crm.schemas.deals.read%20crm.schemas.deals.write%20crm.objects.owners.read%20crm.objects.quotes.write%20crm.objects.quotes.read%20crm.schemas.quotes.read%20crm.objects.line_items.read%20crm.objects.line_items.write%20crm.schemas.line_items.read
  5. Granted the required scopes.

After trying to connect the app I get an error: Couldn’t complete the connection An invalid redirect_uri was provided. Please contact the app developer.

Not sure on how can I debug the connection further. Any advice appreciated.

Information on your n8n setup

  • n8n version: 0.193.4
  • Database you’re using (default: SQLite):
  • Running n8n with the execution process [own(default), main]:
  • Running n8n via Docker

Hey @kidrulit,

It looks like Hubspot doesn’t like the callback URL, Is https://n8n.prod.al.specha.co the correct URL for your n8n instance?