Skip to content

2. Client settings

Emir OĞUZ edited this page Jul 10, 2024 · 2 revisions

Creating a Linkedin Client

Basic client creating

const client = new LinkedIn()

No parameter is required when creating a new client.

Parameters of the Linkedin client

const client = new Linkedin(browserSettings, linkedinSettings)

There are 2 base parameters in construction of a linkedin client.

1. browserSettings: Puppeteer Launch Options

The browser settings goes directly to the puppeteer browser creation launch options. You can find detailed settings here.

2. linkedinSettings: Linkedin Client Settings

This settings is used for changing language options and waiting times. By default it is set to English. You can easily change it to your locale.

For example: Turkish

const client = new LinkedIn(
  { headless: true },
  {
    PROFILEBUTTON_MESSAGE: 'Mesaj',
    PROFILEBUTTON_CONNECT: 'Bağlantı kur',
    PROFILEBUTTON_FOLLOW: 'Takip Et',
    BUTTON_MORERESULTS: 'Daha fazla sonuç göster',
    COOLDOWN_MIN: 15, //seconds
    COOLDOWN_MAX: 30, //seconds
  }
)