***

title: create_token
slug: /reference/python/rest/chat/create-token
description: Create a Chat authentication token.
max-toc-depth: 3
---------------------

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

Create a Chat authentication token.

<EndpointSchemaSnippet endpoint="POST /api/chat/tokens" />

## **Response Example**

<EndpointResponseSnippet endpoint="POST /api/chat/tokens" />

## **Example**

```python {9}
from signalwire.rest import RestClient

client = RestClient(
    project="your-project-id",
    token="your-api-token",
    host="your-space.signalwire.com",
)

token = client.chat.create_token(
    channels=["support-room"],
    member_id="user-456",
    ttl=3600,
)
print("Chat token:", token.get("token"))
```