Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/pages/docs/chat/setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,13 @@ API keys and tokens have a set of [capabilities](/docs/auth/capabilities) assign
| Typing indicators | `publish`, `subscribe` |
| Room reactions | `publish`, `subscribe` |

When setting the capabilities for Chat, you need to apply them to either a wildcard resource, or a wildcard resource prefixed with the chat namespace, for example:
When setting the capabilities for Chat, you can apply them to specific chat rooms, a group of chat rooms in a common namespace, or all chat rooms:

* `[chat]*` or
* `[*]*`
* `my-chat-room` or
* `dms:*` or
* `*`

For more guidance, see the [capabilities documentation](/docs/auth/capabilities).

## Install <a id="install"/>

Expand Down
2 changes: 1 addition & 1 deletion src/pages/docs/guides/chat/build-livestream.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ const currentTime = Math.round(Date.now() / 1000);
const claims = {
"iat": currentTime, /* current time in seconds */
"exp": currentTime + 14400, /* time of expiration in seconds */
"x-ably-capability": "{\"[chat]foo\":[\"publish\", \"subscribe\"]}",
"x-ably-capability": "{\"foo\":[\"publish\", \"subscribe\"]}",
"x-ably-clientId": "your-client-id",
}

Expand Down