---
title: "Refresh the cookies of a connected scraping account"
method: PUT
path: "/linkedin-scrappers/authes/{id}"
tags: ["LinkedIn scraper"]
---

# Refresh the cookies of a connected scraping account

`PUT /linkedin-scrappers/authes/{id}`

## Request

- Base URL: `https://api.emelia.io`
- URL: `https://api.emelia.io/linkedin-scrappers/authes/{id}`
- Auth: API key in header `Authorization`

Replaces the session cookies of a scraping account (its `authId`), typically after a scraper stopped with `INVALID_COOKIE` or when the account shows `status: invalid`. `status` is set back to `valid` (the cookies are not tested at this moment). Then restart the stopped scraper with `PUT /linkedin-scrappers/{scrapperId}/resume`.

Send the complete set every time: `li_a`, `ua`, `viewport`, `country` and `additionnalsCookie` that you omit are cleared, and so is the LinkedIn profile shown in the app.

Returns the same account id. Only scraping accounts can be updated here (not campaign accounts).

## Path parameters

- `id` string, required

## Request body

- ScrapperAuthCookies: Session cookies of a LinkedIn account logged in to Sales Navigator.
  - `li_at` string, required: Value of the `li_at` cookie (LinkedIn session). Required.
  - `li_a` string: Value of the `li_a` cookie (Sales Navigator session).
  - `jsessionid` string: Accepted but ignored. Send `JSESSIONID` in `additionnalsCookie`.
  - `ua` string: User agent of the browser the cookies come from.
  - `additionnalsCookie` union[]: Other linkedin.com cookies of the same session (spelling with two n is the real field name). `li_at`, `li_a` and `JSESSIONID` entries are dropped (the latter is then lost).
    - union
      - ScrapperCookie: A browser cookie as exported by the browser (extra attributes such as `path`, `expires`, `secure` are accepted). Without `domain`, `.www.linkedin.com` is used.
        - `name` string, required
        - `value` string, required
        - `domain` string
      - string: `name=value` string: accepted, but not used by the Sales Navigator scraper.
  - `viewport` ScrapperViewport: Window size of the browser the cookies come from. Both values required when the object is sent.
    - `width` number, required
    - `height` number, required
  - `country` string: ISO 3166-1 alpha-2 code of the country the account is used from (for example `FR`). Emelia browses LinkedIn through a proxy located in this country.

## Response `200`

Cookies replaced, account valid again.

- ScrapperAuthIdResponse
  - `success` boolean, required
  - `authId` string, required: Account id.

## Other responses

- `400`: Invalid body or unknown account.
- `401`: Missing or invalid API key (`Authorization` header).
- `404`: The id is not 24 hexadecimal characters: no route matches and the server answers with its default HTML page (not JSON).
- `500`: Unexpected server error. Current behavior: also returned when the per-minute API quota of the workspace is exceeded (30 requests per minute without subscription, 100 on Start, 300 on Grow, 1,000 on Scale). A 429 would be expected; retry after a minute.

---

[API](https://skmtc.dev/emelia/apis/emelia-api.md) · [All operations](https://skmtc.dev/emelia/apis/emelia-api/llms.txt) · [OpenAPI document](https://skmtc.dev/emelia/apis/emelia-api/revisions/8c0cb435f2c4?raw)
