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

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

Asks the client for a stored cookie identified by `key`. The server can send it at any time during play. The client must answer with a serverbound CookieResponse containing the stored payload, or an empty response if it has none.

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