#Getting You are not authorized to use this command. error

1 messages · Page 1 of 1 (latest)

bright glade
#

I updated openclaw and tried to use /restart and got You are not authorized to use this command, how can i authorize myself?

nocturne juniperBOT
calm hareBOT
#

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

nocturne juniperBOT
elder forgeBOT
#

Let me verify the docs path, then I’ll tell you the exact fix.

#

I found the auth section. One more quick check for the exact config knobs, then I’ll answer cleanly.

#

/restart is auth-gated. On Discord, commands can still show in the UI even when you are not allowed to run them.

The important bit:

  • /restart is not usually ownerAllowFrom
  • it checks whether you are an authorized sender
  • if commands.allowFrom is set, that becomes the only command auth source

So the usual fixes are:

{
  commands: {
    allowFrom: {
      discord: ["user:YOUR_DISCORD_USER_ID"]
    }
#
  }
}

Or, for guild/thread access, add yourself to the Discord guild/channel user allowlist:

{
  channels: {
    discord: {
      guilds: {
        YOUR_SERVER_ID: {
          users: ["YOUR_DISCORD_USER_ID"],
          channels: {
            YOUR_CHANNEL_ID: {
#
              allow: true,
              users: ["YOUR_DISCORD_USER_ID"]
            }
          }
        }
      }
    }
  }
}

A couple of gotchas:

  • channels.discord.allowFrom is mainly for DM auth
  • if commands.allowFrom already exists, changing only guild/channel users may not fix slash commands
  • after changing config, restart locally with openclaw gateway restart