---
title: Cookie Response
description: "Play 0x15, client → server."
---

`play` · `0x15` · **serverbound** (client → server)

Reply to a `CookieRequest` sent in the play state. It carries the cookie key and the stored payload, or no payload if the client has none.

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/play/serverbound/CookieResponse.ts`](https://github.com/GDLev/mc-protocol/blob/master/src/Core/Versions/776/Packets/play/serverbound/CookieResponse.ts)
