---
title: "TypeScript SDK: Stream"
description: "The methods of the TypeScript client under Stream. Events pushed over a WebSocket, with replay."
url: https://doorman.fyi/docs/sdk/reference/stream
markdown: https://doorman.fyi/docs/sdk/reference/stream.md
area: "SDKs and tools"
section: "TypeScript SDK"
---

# TypeScript SDK: Stream

The methods of the TypeScript client under Stream. Events pushed over a WebSocket, with replay.

Source: https://doorman.fyi/docs/sdk/reference/stream

## client.stream

TypeScript:
```ts
client.stream(options: StreamOptions = {}): InboxStream
```

Operation [`stream`](https://doorman.fyi/docs/reference/stream.md#stream): `GET /v1/ws`

A WebSocket to `/v1/ws` that pushes events as they happen, with the credential as `?token=`. Keys or REST app tokens with events:read and mail:read; a session token is refused. Never log the connection URL.

Access `key`: an API key, or a correctly scoped app token where delegated access is allowed; console sessions are refused. An app token needs `events:read` and `mail:read`.
