LinkedIn OAuth Works in Postman but Fails in n8n – “invalid_request” Error (Need Help)

I’m facing an issue while connecting LinkedIn OAuth with n8n, and I’m hoping someone here can point me in the right direction.

Here’s the situation:

  • I have created a custom LinkedIn app

  • The app is fully verified

  • OAuth flow works perfectly in Postman

  • Access token is generated successfully outside n8n

However, when I enter the same client ID, client secret, and redirect URI in n8n, the LinkedIn account connection fails.

I keep getting this error:

{
  "error": "invalid_request",
  "error_description": "Unable to retrieve access token: appid/redirect uri/code verifier does not match authorization code. Or authorization code expired. Or external member binding exists"
}

Things I’ve already checked:

  • Redirect URI matches (as per LinkedIn app settings)

  • App credentials are correct

  • App permissions/scopes are approved

  • OAuth works fine via Postman

It feels like something specific to n8n’s OAuth implementation (PKCE / redirect handling / cached auth?) but I’m not able to pinpoint it.

Has anyone:

  • Successfully connected a custom LinkedIn app with n8n?

  • Faced this exact error before?

  • Found a workaround or configuration fix?

Any guidance, docs, or practical tips would be highly appreciated :folded_hands:
Thanks in advance — really looking forward to resolving this.

Have you checked that you’re running the latest version of n8n?
There was a bug with OAuth that got fixed with version 2.1.3:

@saimansolutions
Thanks for the suggestion let me try it