> For the complete documentation index, see [llms.txt](https://zumo.fusion.ac/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://zumo.fusion.ac/documentation/getting-started/quickstart.md).

# Quickstart

Go from zero to a live Zed Socket.IO event in a few minutes.

{% stepper %}
{% step %}

## Get a consumer key

Join the [Zumo Discord](https://discord.gg/t4HAw5wvDf), run `/zed request`, and pick the consume (and provide, if you need `replayRequest`) scopes you need. Wait for approval.

{% hint style="warning" %}
Zed caches keys for about 60 seconds. Fresh approvals or ACL changes may not apply instantly.
{% endhint %}
{% endstep %}

{% step %}

## Install the Socket.IO client

```bash
npm install socket.io-client
```

{% endstep %}

{% step %}

## Connect and listen

```js
import { io } from 'socket.io-client';

const HUB_URL = 'https://zed.fusion.ac';
const KEY = process.env.ZUMO_CONSUMER_KEY; // zk_...

const socket = io(HUB_URL, {
  auth: { key: KEY },
  // omit query.mode to receive all modes your key allows
});

socket.on('connect', () => console.log('connected', socket.id));
socket.on('connect_error', (err) => console.error(err.message));

socket.on('playerJoined', (data) => {
  console.log(data.mode, data.lobbyId, data.username);
});
```

{% endstep %}

{% step %}

## Confirm ACL

Your key must include the event names you subscribe to (for example `playerJoined`) in its **consume** ACL. Request the scopes you need when you run `/zed request`.
{% endstep %}
{% endstepper %}

## Next steps

* [Getting a key](/documentation/getting-started/getting-a-key.md)
* [Connecting](/documentation/guides/connecting.md)
* [Recording a replay](/documentation/guides/recording-a-replay.md)
* [API Reference](https://gitbook-templates.gitbook.io/api-reference/)
