> For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

# PubSubResource

> PubSub API namespace for token creation.

PubSub API namespace for token creation.

## **Methods**

#### [createToken](/docs/server-sdks/reference/typescript/rest/pubsub/create-token)

Create a PubSub token.

## **Example**

```typescript {4}
import { RestClient } from "@signalwire/sdk";

const client = new RestClient();
const result = await client.pubsub.createToken({ channels: ['notifications'] });
```