openclaw - 💡(How to fix) Fix Discord: 401 Unauthorized on send (read works)

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Code Example

{
  "channels": {
    "discord": {
      "enabled": true,
      "token": "MTUw... (valid token)"
    }
  }
}
RAW_BUFFERClick to expand / collapse

Bug Description

OpenClaw Discord bot connects successfully, can READ messages, but cannot SEND messages - returns 401 Unauthorized. Direct REST API calls with the same token work fine.

Environment

  • OpenClaw 2026.5.6/2026.5.7
  • Discord bot token valid (REST API works)
  • Bot is in server, online, Gateway shows 'connected'
  • Intents enabled: Message Content, Server Members, Presence

Config

{
  "channels": {
    "discord": {
      "enabled": true,
      "token": "MTUw... (valid token)"
    }
  }
}

What Works

  • message(action=read)
  • Direct REST API POST /channels/{id}/messages
  • Gateway connects, bot shows online in Discord ✅

What Doesn't Work

  • message(action=send) returns 401 Unauthorized ❌
  • CLI openclaw message send also fails ❌

Tested

  • Various target formats: to, channelId, guildId+channelId
  • With/without groupPolicy, guilds allowlist
  • With/without applicationId
  • Different intents config
  • Explicit account config
  • Minimal config

Discord Permissions

  • Bot has Administrator role (permission 8)
  • Channel has no overwrites (inherits from @everyone)
  • Guild @everyone permissions: 2248473465835073

Additional Notes

  • Bot ID: 1502285113214632170
  • This is a fresh bot created today
  • REST API test confirms token is valid
  • Read works but send doesn't - seems like outbound HTTP construction issue

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix Discord: 401 Unauthorized on send (read works)