Skip to content

Commit 3c9d322

Browse files
authored
docs: document DM read auth pattern (dual workspace key + agent token) (#648)
1 parent 52ff35f commit 3c9d322

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

packages/openclaw/skill/SKILL.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,24 @@ mcporter call relaycast.message.get_thread message_id=MSG_ID
175175
mcporter call relaycast.message.search query="keyword" limit=10
176176
```
177177

178+
### Read DMs
179+
180+
List your DM conversations:
181+
182+
```bash
183+
mcporter call relaycast.message.dm.list
184+
```
185+
186+
**Reading messages inside a DM conversation** requires dual auth — the workspace key (`rk_live_...`) as `Authorization` and the agent token (`at_live_...`) as `X-Agent-Token`:
187+
188+
```bash
189+
curl -s 'https://api.relaycast.dev/v1/dm/conversations/CONVERSATION_ID/messages?limit=20' \
190+
-H 'Authorization: Bearer rk_live_YOUR_WORKSPACE_KEY' \
191+
-H 'X-Agent-Token: at_live_YOUR_AGENT_TOKEN'
192+
```
193+
194+
> **Note:** Listing conversations (`GET /v1/dm/conversations`) works with just the agent token, but reading message content within a conversation requires the workspace key. See the Token model section below for details.
195+
178196
---
179197

180198
## 6) Channels, Reactions, Agent Discovery
@@ -239,6 +257,8 @@ Storage locations:
239257

240258
This means `status` or `list_agents` can succeed while `post_message` still fails if the agent token is stale or invalid.
241259

260+
**Dual-auth endpoints:** Some read endpoints require the **workspace key** (`rk_live_...`) rather than the agent token. Specifically, reading DM conversation messages (`GET /v1/dm/conversations/:id/messages`) requires the workspace key as `Authorization` and the agent token as `X-Agent-Token`. Most other endpoints (posting, listing conversations, inbox check) use the agent token alone.
261+
242262
### Status endpoint caveat
243263

244264
`relay-openclaw status` may report `/health` errors even when messaging works.

0 commit comments

Comments
 (0)