> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usechar.com/llms.txt
> Use this file to discover all available pages before exploring further.

# WorkOS

> Configure WorkOS user tokens for Char publishable-key embeds

Use WorkOS-authenticated user tokens with Char.

<Warning>
  Ensure your token audience configuration matches what you enter in Char allowed audiences.
</Warning>

## 1) Configure WorkOS in Char

Enter issuer/domain settings and allowed audiences.

## 2) Get token from WorkOS auth layer

```ts theme={null}
const idToken = await getWorkOSIdToken();
```

## 3) Connect

```ts theme={null}
agent.connect({
  publishableKey: "pk_live_...",
  idToken,
});
```

<Card title="Embedding Guide" icon="code" href="/guides/embedding-agent" />
