SessionCourier install now ↗

reference

Export formats

Exact shape of every SessionCourier export — JSON, Playwright storageState, Netscape cookies.txt, and a runnable curl command.

JSON

For: full-fidelity browser round-trips — export on one machine, import on another (or back into the same browser later). This is the format the import/export guide and the multi-account workflow use for session snapshots.

An array of cookie objects mirroring the Chrome extension cookie shape:

[
  {
    "name": "session",
    "value": "abc123",
    "domain": ".staging.example.com",
    "path": "/",
    "expirationDate": 1789430400,
    "hostOnly": false,
    "httpOnly": true,
    "secure": true,
    "sameSite": "lax",
    "session": false
  }
]

Field notes:

FieldMeaning
expirationDateExpiry as Unix seconds; absent for session cookies
hostOnlytrue when the cookie is bound to the exact host (no leading dot)
sessiontrue for session cookies that vanish when the browser closes
sameSiteChrome’s lowercase values: "no_restriction", "lax", "strict", "unspecified"

Because it uses Chrome’s own field names and casing, this format is not directly consumable by Playwright or Puppeteer — use the storageState export for those.

Playwright storageState

For: starting Playwright browser contexts pre-authenticated, and feeding Puppeteer’s setCookie. The Playwright guide shows the full workflow.

{
  "cookies": [
    {
      "name": "session",
      "value": "eyJhbGciOiJIUzI1NiIs…",
      "domain": ".staging.example.com",
      "path": "/",
      "expires": 1789430400,
      "httpOnly": true,
      "secure": true,
      "sameSite": "Lax"
    }
  ],
  "origins": []
}

Field notes:

  • expires is Unix seconds in Playwright’s convention; -1 marks a session cookie.
  • sameSite uses Playwright’s capitalized values: "Strict", "Lax", "None".
  • origins is Playwright’s slot for localStorage. Include this tab’s localStorage on the storageState row fills it with the active tab’s origin; that box is ticked by default in the site view, and untick it to leave the array empty. On import, SessionCourier offers to restore those entries into the matching tab, after a confirmation naming the keys it will set. It can only ever hold that one origin — localStorage is readable only from a live document of its own origin, so there is no way to collect it for several sites at once. sessionStorage and IndexedDB are not covered: Playwright’s format has no field for sessionStorage at all, and while Playwright can capture IndexedDB itself (storageState({ indexedDB: true }), 1.51+), our export does not fill it.
  • The cookies array is also exactly what Puppeteer’s page.setCookie(...cookies) accepts, so one export serves both tools.

Netscape cookies.txt

For: command-line tools — curl -b, wget --load-cookies, yt-dlp --cookies. See the import/export guide for usage examples.

# Netscape HTTP Cookie File
.staging.example.com	TRUE	/	TRUE	1789430400	session	abc123
#HttpOnly_.staging.example.com	TRUE	/	TRUE	1789430400	refresh_token	xyz789

One cookie per line, seven tab-separated fields:

#FieldMeaning
1domainCookie domain; a leading #HttpOnly_ prefix marks an HttpOnly cookie
2includeSubdomainsTRUE if subdomains match (domain starts with a dot)
3pathCookie path
4secureTRUE if the cookie is HTTPS-only
5expiryExpiry as Unix seconds; 0 for session cookies
6nameCookie name
7valueCookie value

curl command

For: quick, one-off API calls — a runnable curl command that replays the current cookies against the site.

curl 'https://staging.example.com/' -H 'Cookie: session=abc123; refresh_token=xyz789'

The cookies go on the wire as one literal Cookie request header (-H), so exactly what the browser sends is replayed. The URL scheme is https when any cookie is Secure, else http; a single-site export collapses to one command, while an all-sites export emits one command per host. Only cookie values travel — no domain, path, expiry, or flags — so it can’t round-trip a session; treat it as disposable.