Skip to main content
GET
/
sessions
/
{session_id}
/
cookies
python
import json
from notte_sdk import NotteClient

notte = NotteClient()
with notte.Session() as session:
    # perform some operation that creates cookies
    # ...
    # then save the cookies to json
    cookies = session.get_cookies()
    with open("cookies.json", "w") as f:
        json.dump(cookies, f)
import { NotteClient } from "notte-sdk";
import { writeFileSync } from "fs";

const notte = new NotteClient();
await notte.Session().use(async (session) => {
// perform some operation that creates cookies
// ...
// then save the cookies to json
const cookies = await session.getCookies();
writeFileSync("cookies.json", JSON.stringify(cookies));
});
curl -X GET "https://api.notte.cc/sessions/$session_id/cookies" \
-H "Authorization: Bearer $NOTTE_API_KEY" \
-H "Content-Type: application/json"
{
  "cookies": [
    {
      "name": "<string>",
      "value": "<string>",
      "domain": "<string>",
      "path": "<string>",
      "httpOnly": true,
      "expirationDate": 123,
      "hostOnly": true,
      "secure": true,
      "session": true,
      "storeId": "<string>",
      "expires": 123,
      "partitionKey": "<string>"
    }
  ]
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Headers

x-notte-request-origin
string | null
x-notte-sdk-version
string | null

Path Parameters

session_id
string
required

Query Parameters

update_metadata
boolean
default:true

Response

Successful Response

cookies
Cookie · object[]
required