---
title: Cookie Request
description: "Login 0x05, server → client."
---

`login` · `0x05` · **clientbound** (server → client)

Asks the client for a stored cookie by key during login. The client must reply with `CookieResponse` carrying the payload, or an empty response if it has no such cookie. Used mainly by proxies and transfer flows.

Sent by the server, read by the client. Listen for it with `client.on("CookieRequest", (data) => …)` on the receiving side.

## Fields

| Field | Type | Notes |
|---|---|---|
| `cookie` | String | also `key` |

## Send it

```ts
await client.sendPacket("CookieRequest", {
  cookie: /* String */,
});
```

Field aliases listed under Notes are accepted as alternative keys when writing.

Source: [`src/Core/Versions/776/Packets/login/clientbound/CookieRequest.ts`](https://github.com/GDLev/mc-protocol/blob/master/src/Core/Versions/776/Packets/login/clientbound/CookieRequest.ts)
