ChatClient.
Authentication Flow
- Your auth server authenticates the user
- Your auth server issues an Ably-compatible token (JWT format is recommended for most apps)
- The client SDK fetches tokens with
authCallbackand refreshes them automatically before expiry - The authenticated Pub/Sub client is passed into
ChatClient
Server Setup
Create an endpoint that validates user-provided credentials and returns JWTs with the appropriate Chat capabilities:- Tab Title
- Tab Title
Client Setup
- Tab Title
- Tab Title
Chat Capabilities
Capabilities are permissions that control what operations a client can perform:| Feature | Required Capabilities |
|---|---|
| Send messages | publish |
| Receive messages | subscribe |
| Update messages | message-update-any or message-update-own |
| Delete messages | message-delete-any or message-delete-own |
| Message history | subscribe, history |
| Message reactions | annotation-publish, optionally annotation-subscribe |
| Presence | subscribe, presence |
| Typing indicators | publish, subscribe |
| Room reactions | publish, subscribe |
| Occupancy | subscribe, channel-metadata |
Room-scoped Capabilities
You can scope capabilities to specific rooms, a namespace of rooms, or all rooms:my-chat-room- a specific roomdms:*- all rooms in thedms:namespace*- all chat rooms
Next Steps
- Learn about connections
- Start building with rooms
- Explore message features
