Docs
Dashboard
API reference / BrowserBeta

Export cookies to a file

A Netscape cookie file in the workspace, for curl or wget in the shell. 409 browser_disabled on a session created with browser: false.

POST/v1/sessions/{id}/browser/export-cookies

Request

Method and pathPOST/v1/sessions/{id}/browser/export-cookies
Base URLhttps://api.boxline.dev
AuthenticationYour API key in the x-api-key header (or Authorization: Bearer). The examples read it from BOXLINE_API_KEY.

Path parameters

NameTypeDefaultAllowed valuesDescription
idrequiredstring––

Body

JSON with content-type: application/json. Optional: you can leave the body out.

NameTypeDefaultAllowed valuesDescription
pathstringcookies.txt–
curl -X POST "https://api.boxline.dev/v1/sessions/$SESSION_ID/browser/export-cookies" \  -H "x-api-key: $BOXLINE_API_KEY"

Responses

200 OK

The file and how many cookies it holds.

Fields

NameTypeDefaultAllowed valuesDescription
pathstring––
countinteger––
Response 200
{  "path": "/workspace/downloads/report.csv",  "count": 0}

Errors

Errors have a matching HTTP status and the same body. code is stable, so check it in your code; message is for people. See Errors and request ids.

StatusCodesWhen
401 UnauthorizedunauthorizedMissing or invalid API key.
404 Not Foundnot_found, invite_not_found, provider_unavailableNo such thing in this project (or organization), or no such route.
409 Conflictsession_not_running, shell_disabled, browser_disabled, nothing_saved, not_resumable, invalid_state, conflict, email_taken, identity_in_use, provider_already_linked, last_sign_in_method, not_impersonating, machine_too_old, too_many_credential_values, limit_reached, terms_version_mismatch, no_project, last_owner, organization_not_empty, project_has_sessions, already_member, invite_pending, idempotency_in_progressThe current state does not allow it, or a request with this Idempotency-Key is still being answered.
Error body
{  "error": {    "code": "not_found",    "message": "session not found",    "requestId": "req_4fJx0aQm2Lk9Pz7N"  }}

Learn more

These docs describe a beta API. Endpoints, fields and SDK methods may change before general availability; breaking changes will be listed in the changelog.