You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: apps/docs-website/src/content/docs/guides/integrations/bots.mdx
+49-9Lines changed: 49 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,9 @@ bot's profile shows its purpose, data-handling description, and the application
10
10
capabilities its owner or a server administrator approved.
11
11
12
12
<Asidetype="caution">
13
-
Bot APIs are experimental in Chatto 0.5. Pin and test the server versions your integration supports, and treat capability identifiers as unstable until Chatto reaches 1.0.
13
+
Bot APIs are experimental in Chatto 0.5. Pin and test the server versions your
14
+
integration supports, and treat capability identifiers as unstable until
15
+
Chatto reaches 1.0.
14
16
</Aside>
15
17
16
18
## The Authorization Model
@@ -28,11 +30,11 @@ self-join rooms.
28
30
29
31
## Initial Capabilities
30
32
31
-
| Capability | Allows |
32
-
| ---------- | ------ |
33
-
|`dm.messages.read`| Listing and reading complete histories of DMs in which the bot is an explicit participant. Users cannot start a DM with the bot without this grant. |
34
-
|`thread.messages.read`| Listing and reading only channel threads where an installed bot was directly mentioned. |
35
-
|`messages.write`| Posting text messages in explicit DMs and invited threads, or posting root text messages through the incoming webhook to an explicitly installed channel. |
|`dm.messages.read`| Listing and reading complete histories of DMs in which the bot is an explicit participant. Users cannot start a DM with the bot without this grant.|
36
+
|`thread.messages.read`| Listing and reading only channel threads where an installed bot was directly mentioned. |
37
+
|`messages.write`| Posting text messages in explicit DMs and invited threads, or posting root text messages through the incoming webhook to an explicitly installed channel. |
36
38
37
39
Use `BotService.ListApplicationCapabilities` instead of hard-coding this table.
38
40
The response is the exhaustive catalogue understood by that server and includes
@@ -45,6 +47,10 @@ Bot creation issues one show-once API key. Send it as a bearer token only to
45
47
protected asset endpoints, room directory, and self-join operations reject bot
46
48
keys even when the key itself is valid.
47
49
50
+
The bot owner can reset an active key, and a server administrator can revoke
51
+
it. A revoked bot has no API access until its owner selects **Generate API key**
52
+
and copies the new show-once secret.
53
+
48
54
The bot runtime API supports listing explicit bot DMs and invited threads,
49
55
reading their timeline pages, and posting text messages in those contexts. Use
50
56
the opaque timeline cursors unchanged and never derive storage coordinates from
@@ -74,6 +80,28 @@ token:
74
80
}
75
81
```
76
82
83
+
For a bot in the local `mise dev` stack, copy the bot ID from its settings URL
84
+
and the channel room ID from the channel URL. Then run:
0 commit comments