Credential Linkedin

Hello,
Are there people who have managed to have an OAuth that works with Linkedin? Because every time I get an error like this:

Received following query parameters: {“error”:“unauthorized_scope_error”,“error_description”:“Scope "r_emailaddress" is not authorized for your application”,“state”:“eyJ0b2tlbiI6IlNrR2FEaWhpLU5ta2RZYkViYU9kZk9jSWJEQWMxbGowSkJkNCIsImNpZCI6IlZiQWY3bWlHMXlaVU w5TjEifQ==”}

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hey @Jeremy_DE_CAMPOS,

Which version of n8n are you using and which product do you have enabled in LinkedIn?

Hmm, I had a version that was too old, I saw your message on another topic, now it’s good :wink:

However, I have a problem with the image. When there is an image, I get an error. I tested without image, it works

Hey @Jeremy_DE_CAMPOS,

It looks like it is just html from LinkedIn which is odd, Does it say anything further down the error? There is normally a trace that be handy to see where the error is coming from.

I have this which could be interesting as an error

document.documentElement.className += " js “; !function(){“use strict”;function t(t,e){if(e=e||“log”,“undefined”!=typeof window&&window&&window.jet&&“error”===e.toLowerCase())try{throw new Error(t)}catch(t){try{window.jet.error(t)}catch(t){}}“undefined”!=typeof console&&“function”==typeof console[e]&&consolee}var e=/ /g,n=/[\s\u0000”]|%00/,r=/\/,o=/([.]|%2e){2}/i,i=new RegExp(“^(?:https?|ftp|mailto|tel|sms|blob|voyager|android-app|linkedin|chrome-extension|invalid|data:(?:(?:image/(?:gif|jpe?g|png))|(?:application/x-font-woff)|(?:font/(?:opentype|ttf)))[;,]|[/.#?])”);var a=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=,r=!0,o=!1,i=void 0;try{for(var a,l=tSymbol.iterator;!(r=(a=l.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&l.return&&l.return()}finally{if(o)throw i}}return n}(t,e);throw new TypeError(“Invalid attempt to destructure non-iterable instance”)}}(),l=“search”;function c(){return function(){return((arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location)[arguments.length>1&&void 0!==arguments[1]?arguments[1]:l]||“”).slice(1).split(/&/g).reduce(function(t,e){var n=e.split(“=”),r=a(n,2),o=r[0],i=r[1];return o&&(t[decodeURIComponent(o)]=decodeURIComponent(i||“”)),t},{})}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location,l)}var d,s=“en_US”;function u(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s;if(arguments.length>1&&void 0!==arguments[1]&&arguments[1]){var l=“ar_AE”===a;document.documentElement.setAttribute(“lang”,a.split(“_”)[0]),document.body.setAttribute(“data-lang”,a),document.body.setAttribute(“dir”,l?“rtl”:“ltr”);var c=document.getElementById(“DOM_CSS”),d=document.getElementById(“i18n_rtl_css”),u=void 0,f=c.innerText;document.getElementById(“i18n_ltr_css”)?u=document.getElementById(“i18n_ltr_css”):((u=document.createElement(“meta”)).setAttribute(“id”,“i18n_ltr_css”),u.setAttribute(“name”,“i18n_ltr_css”),u.content=f,d.parentNode.appendChild(u));var m=d.content,p=u.content;c.innerText=l?m:p,c.setAttribute(“dir”,l?“rtl”:“ltr”),history&&history.replaceState({},“”,“?l=“+a)}else{var g=window.location.pathname;a=a.toLowerCase().replace(””,“-”);var v=g.split(“.”)[0].split(“/”),h=v[v.length-1],w=h.substring(h.length-5),y=“”;y=0!==window.location.href.indexOf(“file:///”)?function(a){var l=void 0;if(“string”!=typeof a)return t(“jSecure Warning: url must be a string”,“error”),“invalid://”;if((l=a.trim()).indexOf(" ")>-1&&(t(“jSecure Warning: url should not contain spaces: “+a,“warn”),l=l.replace(e,”+”)),!i.test(l))return t("jSecure Error: URL should be absolute with allowed schemas, relative, a hash fragment or query string. "+a,“error”),“invalid://”;if(n.test(l))return t(“jSecure Error: not valid url character found in url: “+a,“error”),“invalid://”;var c=l.split(”?”)[0];return r.test(c)||o.test(c)||o.test(decodeURI(c))?(t(“jSecure Error: malicious data found in url path: “+c,“error”),“invalid://”):a}(window.location.href.replace(w,function(){return a})):window.location.href.replace(w,function(){return a}),location.assign(y)}}function f(t){var e=t.offsetHeight;document.body.style.marginBottom=e+“px”}!function(){var t,e,n,r=document.getElementById(“selectLanguage”),o=“true”===r.getAttribute(“data-embedi18n”),i=(t=RegExp(/lang=([a-z]{2}[-][a-z]{2})/),!(e=document.cookie.match(t))||e.length<1?“en-us”:e[1]),a=c(),l=a.l!==s||“en-us”!==i;if(r&&(r.addEventListener(“change”,function(t){u(t.target.value,o)}),o&&l)){var d=a.l||((n=i.split(“-”))[1]=n[1].toUpperCase(),n.join("“)),f=document.getElementById([“i18n”,d].join(””));u(d=f?d:s,o);for(var m=0,p=r.options.length;m=0&&e=3&&e<6?“medium”:“fast”;var r=t.getAttribute(“class”).split(” “);r.push(n),t.setAttribute(“class”,r.join(” "))});var o=function(){var n=t.getBoundingClientRect();e.style.transformOrigin=n.left+"px "+n.top+“px”};!function(t,e,n){n=n||window;var r=!1;n.addEventListener(t,function(){r||(r=!0,requestAnimationFrame(function(){n.dispatchEvent(new CustomEvent(e)),r=!1}))})}(“resize”,“optimizedResize”),window.addEventListener(“optimizedResize”,function(){o()}),o()}()}();

and This :

Bahasa Indonesia (Bahasa Indonesia)\n Bahasa Malaysia (Malay)\n Čeština (Czech)\n Dansk (Danish)\n Deutsch (German)\n English (English)\n Español (Spanish)\n 繁體中文 (Chinese (Traditional))\n Français (French)\n 한국어 (Korean)\n Italiano (Italian)\n 简体中文 (Chinese (Simplified))\n Nederlands (Dutch)\n 日本語 (Japanese)\n Norsk (Norwegian)\n Polski (Polish)\n Português (Portuguese)\n Română (Romanian)\n Русский (Russian)\n Svenska (Swedish)\n Tagalog (Tagalog)\n ภาษาไทย (Thai)\n Türkçe (Turkish)\n العربية (Arabic)\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n لم يتم العثور على الصفحة\n عفواً، لم نتمكن من العثور على الصفحة التي تبحث عنها. برجاء المحاولة مرة أخرى للصفحة السابقة أو الانتقال لـمركز المساعدة للمزيد من المعلومات\n الإنتقال لموجزك الرئيسي\n \n \n\n \n \n \n Stránka nenalezena\n Omlouváme se, nemůžeme najít stránku, kterou hledáte. Zkuste se vrátit zpátky na předchozí stránku, nebo se podívejte do našeho Centra nápovědy pro více informací\n Přejít do informačního kanálu\n \n \n\n \n \n \n Siden blev ikke fundet\n Vi kan desværre ikke finde den side, du leder efter. Gå tilbage til den forrige side, eller besøg Hjælp for at få flere oplysninger\n Gå til dit feed\n \n \n\n \n \n \n Seite nicht gefunden\n Die gewünschte Seite konnte leider nicht gefunden werden. Versuchen Sie, zur vorherigen Seite zurückzukehren, oder besuchen Sie unseren Hilfebereich, um mehr zu erfahren.\n Zu Ihrem Feed\n \n \n\n \n \n \n Page not found\n Uh oh, we can’t seem to find the page you’re looking for. Try going back to the previous page or see our Help Center for more information\n Go to your feed\n \n \n\n \n \n \n Página no encontrada\n Vaya, parece que no podemos encontrar la página que buscas. Intenta volver a la página anterior o visita nuestro Centro de ayuda para más información.\n Ir a tu feed\n \n \n\n \n \n \n Impossible de trouver cette page\n Nous ne trouvons pas la page que vous recherchez. Essayez de retourner à la page précédente ou consultez notre assistance clientèle pour plus d’informations\n Ouvrez votre fil\n \n \n\n \n \n \n Halaman ini tidak dapat ditemukan\n Maaf, sepertinya kami tidak dapat menemukan halaman yang Anda cari. Coba kembali ke halaman sebelumnya atau lihat Pusat Bantuan kami untuk informasi lebih lanjut\n Buka feed Anda\n \n \n\n \n \n \n Pagina non trovata\n Non abbiamo trovato la pagina che stai cercando. Prova a tornare alla pagina precedente o visita il nostro Centro assistenza per saperne di più.\n Vai al tuo feed\n \n \n\n \n \n \n

Was there no stack trace at the bottom of the page?

Is that what you want ?

NodeApiError: Bad request - please check your parameters
    at Object.linkedInApiRequest (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/LinkedIn/GenericFunctions.js:46:15)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/LinkedIn/LinkedIn.node.js:154:29)
    at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:700:19)
    at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:656:53
    at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:1058:20

That is perfect.

Hi @Jon,
So, is it a bug or is it my configuration that’s wrong?

Hey @Jeremy_DE_CAMPOS,

I still need to double check, Will get that tested today.

Ok, thank :slight_smile:

Hi same issue here, is there any update?

Hi All,

I’m having the same issue.

My stack trace is similar but it changes the code lines

Putting it here for context

I’m using version 1.26

NodeApiError: Bad request - please check your parameters
    at Object.linkedInApiRequest (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/LinkedIn/GenericFunctions.js:46:15)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/LinkedIn/LinkedIn.node.js:154:29)
    at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:730:19)
    at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:662:53
    at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:1064:20```

Which product do you have enabled on your LinkedIn app and which credential are you using?

Hey @Jon

Thanks for your message

I’m using the new credential and have enabled the sign-in and the share products

When I use only text without binary data works no problem

The issue comes when I attach the binary data

Let me know if you need any more info to help debugging

1 Like

Hey @jaymgonzalez,

The new credential is for the community Management product so you may need to use the other linkedin credenital and disable the legacy option.

Hi @Jon , I’m using the other linkedin credential and disabled the legacy option.

Just like @jaymgonzalez says, when I use only text without binary data works no problem.
The issue comes when I attach the binary data

Here is the credential:

I’m using version 1.26 and this is the error:

NodeApiError: Bad request - please check your parameters
    at Object.linkedInApiRequest (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/LinkedIn/GenericFunctions.js:46:15)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/LinkedIn/LinkedIn.node.js:154:29)
    at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:730:19)
    at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:662:53
    at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:1064:20

and there is also this html response wich is odd:

Please let me know if I can provide you with more information to help.