Connect a LinkedIn account for scraping (session cookies)
Connects a LinkedIn account for Sales Navigator scraping by sending the cookies of a browser session where the user is logged in to LinkedIn and Sales Navigator. No password is involved. The Emelia browser extension does this for you; use this route to automate it.
li_at is required. Strongly recommended: li_a (Sales Navigator session), ua (user agent of the browser the cookies come from), additionnalsCookie (the other linkedin.com cookies, as objects { name, value, domain }), viewport (that browser window size) and country (ISO alpha-2 code: Emelia browses LinkedIn through a proxy located in this country; default the workspace country, then FR).
Returns authId, to use in authes of POST /linkedin-scrappers. The same li_at cannot be registered twice. When a session expires, update the existing account with PUT /linkedin-scrappers/authes/{id} instead of creating a new one.
Emelia stores these cookies and refreshes them after each scraping session. There is currently no API route to remove a connected scraping account.
Pitfalls: jsessionid is accepted but ignored (send JSESSIONID inside additionnalsCookie). Cookies sent as "name=value" strings are accepted but not used by the Sales Navigator scraper: send objects. Fields not described here are reserved for Emelia apps; any other field is rejected.
Authorization
apiKey Your 48 character API key, sent as is (a Bearer prefix is tolerated). Create it at https://v3.emelia.io/settings/api.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Session cookies of a LinkedIn account logged in to Sales Navigator.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/linkedin-scrappers/authes" \ -H "Authorization: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "li_at": "AQEDAFakeLiAtCookieForDocsOnly0000000000", "li_a": "AQJ2FakeLiACookieForDocsOnly0000000000", "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36", "additionnalsCookie": [ { "name": "JSESSIONID", "value": "\\"ajax:0000000000000000000\\"", "domain": ".www.linkedin.com" }, { "name": "lang", "value": "v=2&lang=fr-fr", "domain": ".linkedin.com" }, { "name": "bcookie", "value": "\\"v=2&00000000-fake-0000-0000-000000000000\\"", "domain": ".linkedin.com" } ], "viewport": { "width": 1440, "height": 900 }, "country": "FR" }'{ "success": true, "authId": "66e0f1a2b3c4d5e6f7a8b9c0"}