---
title: Store Cookie
description: "Play 0x78, server → client."
---

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

Asks the client to store a small key-value cookie (identifier and up to 5120 bytes) for the current session. The server can later request it with `CookieRequest`, including after a `Transfer` to another server.

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

## Fields

| Field | Type | Notes |
|---|---|---|
| `key` | String |  |
| `value` | Byte[] | also `payload` |

## Send it

```ts
await client.sendPacket("StoreCookie", {
  key: /* String */,
  value: /* Byte[] */,
});
```

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

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