1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "liProfileUrl": "https://www.linkedin.com/in/example-profile/",
12 "texAuVariables": {
13 "yourFirstName": "",
14 "yourLastName": "",
15 "yourJobTitle": "",
16 "yourCompanyName": "",
17 "yourCompanyDescription": "Example company description",
18 "yourUsp": "Example USP"
19 },
20 "connectedAccountId": "example_connected_account_id",
21 "li_at": "example_li_at",
22 "JSESSIONID": "ajax:example",
23 "bcookie": "example_bcookie",
24 "liap": "true",
25 "li_theme_set": "app",
26 "li_theme": "light",
27 "timezone": "Asia/Kolkata",
28 "bscookie": "example_bscookie",
29 "user-agent": "Mozilla/5.0 ...",
30 "timezoneOffset": "5.5",
31 "csrf-token": "example_csrf-token",
32 "profileId": "example-profile-id",
33 "User-Agent": "Mozilla/5.0 ...",
34 "x-li-track": "{\"clientVersion\":\"1.13.455\"}",
35 "x-li-lang": "en_US",
36 "X-Restli-Protocol-Version": "2.0.0",
37 "txSmSelfProfileUrl": "https://www.linkedin.com/in/example-self/",
38 "proxy": {
39 "ip": "http://proxy.example.com",
40 "port": "1080",
41 "username": "example_username",
42 "password": "example_password"
43 }
44};
45
46
47const run = await client.actor("automationagents/linkedin-profile-auto-follow").call(input);
48
49
50console.log('Results from dataset');
51console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
52const { items } = await client.dataset(run.defaultDatasetId).listItems();
53items.forEach((item) => {
54 console.dir(item);
55});
56
57