***

title: PubSubResource
slug: /reference/typescript/rest/pubsub
description: PubSub API namespace for token creation.
max-toc-depth: 3
---------------------

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

PubSub API namespace for token creation.

## **Methods**

<CardGroup cols={3}>
  <Card title="createToken" href="/docs/server-sdks/reference/typescript/rest/pubsub/create-token">
    Create a PubSub token.
  </Card>
</CardGroup>

## **Example**

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

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