#DISCORD - HTTP 401: authentication_error

1 messages ยท Page 1 of 1 (latest)

lavish jayBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> โœ… Mark Solution

rocky onyx
#

@cosmic trout

cosmic troutBOT
# rocky onyx <@1457407575476801641>

I see a 401 authentication error on the Discord channel. This typically means Clawdbot is having trouble authenticating with Discord.

Common causes:

  1. Bot token expired or invalid
  2. Bot missing permissions in that specific channel
  3. Bot was removed/re-invited and needs fresh OAuth
  4. Rate limiting issues

Quick checks:

  • Is the bot still in the server? (/status in Discord should show if it's connected)
  • Are the channel permissions correct? (Bot needs "Send Messages", "Read Message History", etc.)
  • Has the token been rotated recently?

If you're seeing this consistently, Peter may need to:

  • Verify the bot token in config
  • Re-check the bot's permissions in that channel
  • Check clawdbot gateway logs for more details
#

Can you share what you were trying to do when this happened? And does the bot respond in other channels?

rocky onyx
#

just tried setting up whatsapp and get the same error there

#

@cosmic trout

cosmic troutBOT
# rocky onyx just tried setting up whatsapp and get the same error there

Both Discord and WhatsApp returning 401 errors is unusual. This sounds like a setup/authentication issue.

Before troubleshooting, I need:

  1. What does moltbot --version show? (Version mismatch is the #1 cause of weird errors)

  2. Are you using the latest version? (moltbot self-update or git pull && npm install)

  3. For WhatsApp specifically: Did the QR code scan successfully and link? The 401 often appears if the WhatsApp session isn't fully established.

Quick test: Does the bot respond to commands at all, or is it completely non-functional?

If you're mid-setup, the FAQ has troubleshooting steps:
โ†’ https://docs.moltbot.ai/start/faq

Let me know the version and I can help narrow this down! ๐Ÿฆ

cosmic troutBOT
# rocky onyx <@1457407575476801641>

That 401 on both channels suggests the gateway might be in a bad state. Let's diagnose:

Run these commands and paste the output:

clawdbot gateway status
clawdbot gateway logs --tail 50

Also check if the gateway process is even running:

ps aux | grep clawdbot

The 401 usually means:

  • Gateway can't reach Discord API (wrong token, network issue)
  • Gateway service crashed and needs restart
#

Quick restart attempt:

clawdbot gateway restart

Let me know what status and logs show โ€” that'll tell us if it's a token problem, network issue, or something else entirely. ๐Ÿฆ

rocky onyx
#

nvm not a discord issue