---
title: Cookie Response
description: "Login 0x04, client → server."
---

`login` · `0x04` · **serverbound** (client → server)

Reply to a `CookieRequest` during login. It carries the cookie key and the stored payload, or no payload if the client has none. Servers and proxies use it to read data saved by an earlier `StoreCookie`, for example across transfers.

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

## Fields

| Field | Type | Notes |
|---|---|---|
| `key` | String |  |
| `value` | Optional | also `payload` |

## Send it

```ts
await client.sendPacket("CookieResponse", {
  key: /* String */,
  value: /* Optional */,
});
```

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

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