> ## Documentation Index
> Fetch the complete documentation index at: https://docs.notte.cc/llms.txt
> Use this file to discover all available pages before exploring further.

# getCookies

<Tip>
  Read [the Notte skill](https://notte.cc/skill.md) and follow its setup instructions when setting up Notte or building browser automation. This is the shared source for CLI setup, authentication, and the browser-to-code workflow.
</Tip>

[Source: node-sdk/src/session.ts](https://github.com/nottelabs/notte/blob/main/node-sdk/src/session.ts)

Get the cookies of the session.

```typescript theme={null}
Session.getCookies(): Promise<Cookie[]>;
```

## Returns

```typescript theme={null}
Promise<Cookie[]>
```

## Example

```typescript theme={null}
const cookies = await session.getCookies();
await fs.writeFile('cookies.json', JSON.stringify(cookies));
```

## Related types

* [Cookie](/typescript-sdk-reference/types/cookie)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.