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:
| Field | Meaning |
|---|---|
expirationDate | Expiry as Unix seconds; absent for session cookies |
hostOnly | true when the cookie is bound to the exact host (no leading dot) |
session | true for session cookies that vanish when the browser closes |
sameSite | Chrome’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:
expiresis Unix seconds in Playwright’s convention;-1marks a session cookie.sameSiteuses Playwright’s capitalized values:"Strict","Lax","None".originsis Playwright’s slot forlocalStorage. 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 —localStorageis readable only from a live document of its own origin, so there is no way to collect it for several sites at once.sessionStorageand IndexedDB are not covered: Playwright’s format has no field forsessionStorageat all, and while Playwright can capture IndexedDB itself (storageState({ indexedDB: true }), 1.51+), our export does not fill it.- The
cookiesarray is also exactly what Puppeteer’spage.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:
| # | Field | Meaning |
|---|---|---|
| 1 | domain | Cookie domain; a leading #HttpOnly_ prefix marks an HttpOnly cookie |
| 2 | includeSubdomains | TRUE if subdomains match (domain starts with a dot) |
| 3 | path | Cookie path |
| 4 | secure | TRUE if the cookie is HTTPS-only |
| 5 | expiry | Expiry as Unix seconds; 0 for session cookies |
| 6 | name | Cookie name |
| 7 | value | Cookie 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.