3. Login with your account - Ranork/Auto-Linkedin GitHub Wiki

Logging in to Linkedin with an account

First of all you have to create new linkedin client. Then you can login with mail and password.

// Creating new client
const client = new LinkedIn({ headless: false })

// Then login with your account
await client.login('[email protected]', 'your password')

We are not saving or seeing your mail and password. You can check it in from code.

Mainly saving session cache to your local folder (by the default is ./cache/). This saves you from having to log in every time and prevents you from being blocked by LinkedIn.

After login you should see some console output like this:

[TASK] Login
  New Browser created.
  New URL: https://www.linkedin.com/feed/
  Login complated.
  Login cached.

If you seeing an error message make the browser not headless and see whats going on. For example:

[TASK] Login
  New Browser created.
  Url: https://www.linkedin.com/checkpoint/challengesV2/....

Check your LinkedIn app -> We've sent notifications to your signed-in devices.
Open your LinkedIn app and tap Yes to confirm your sign-in

After a successful login client is ready to do jobs.