Is there a way with the API to create and connect LinkedIn credential?

Describe the issue/error/question

Hello n8n community!

I’m building an app where my users will be able to schedule their Linkedin publications. I’m using n8n with npm and I’m trying to use the API to automatically create and connect their LinkedIn credential.

With the API, I can create the credential, but I don’t know how to automatically authorize, get the code, the token, and connect the account.

Is there a way to use the API for that or do I have to use an alternative (like CLI import)?

Thanks a lot for your help!

Julien

Information on your n8n setup

  • n8n version: 0.184.0
  • Database you’re using (default: SQLite): default one
  • Running n8n via [Docker, npm, n8n.cloud, desktop app]: npm

Finally resolved it…

My process :slight_smile:

  • GET : http://localhost:5678/rest/oauth-credential/auth?id={credential_id}
    => Output: json with the authorization URL
  • GET : {authorization URL}
  • Account connected :white_check_mark:

Sorry for the inconvenience and happy if the solution can help someone else!

1 Like