#openclaw devices approve doesn't work

1 messages · Page 1 of 1 (latest)

rich agate
#

It complains about me not having operator.admin. I loaded openclaw settings and stuff from a backup from my old vps to my new vps.

tranquil crownBOT
#

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

wispy onyxBOT
#

That usually means the CLI is connecting with a paired/bootstrap operator token that only has limited scopes, not an admin-capable gateway credential. After restoring from an old VPS backup, this can happen if the cached device token came along but the shared gateway token/password or service env didn’t.

First thing: what does this print?

openclaw --version
openclaw gateway probe
openclaw devices list

Likely fixes:

# If you have the current gateway token/password, approve using it explicitly:
openclaw devices approve <requestId> --token "$OPENCLAW_GATEWAY_TOKEN"
# or:
#
openclaw devices approve <requestId> --password "$OPENCLAW_GATEWAY_PASSWORD"

If you’re running this directly on the new VPS, make sure the CLI is using the same profile/state dir as the running gateway. The docs call out this exact mismatch: if the running gateway uses a different OPENCLAW_PROFILE / OPENCLAW_STATE_DIR, local fallback won’t see the same pending request and you’ll get scope weirdness.

Docs: https://docs.openclaw.ai/cli/devices and https://docs.openclaw.ai/gateway/troubleshooting

rich agate
wispy onyxBOT
#

Yep — sorry, if it gives the same operator.admin error then you’re not actually authenticating with an admin/shared gateway credential. So don’t use the RPC command; reset only the device-pairing files on disk.

This keeps your config, sessions, channel auth, agents, etc. It only makes dashboards/nodes/mobile/operator devices re-pair.

On the VPS where the gateway runs:

openclaw gateway stop

STATE_DIR="${OPENCLAW_STATE_DIR:-$HOME/.openclaw}"
mkdir -p "$STATE_DIR/devices-reset-backup-$(date +%Y%m%d-%H%M%S)"

# move, don't delete
[ -f "$STATE_DIR/devices/paired.json" ] && mv "$STATE_DIR/devices/paired.json" "$STATE_DIR/devices-reset-backup-$(date +%Y%m%d-%H%M%S)-paired.json"
[ -f "$STATE_DIR/devices/pending.json" ] && mv "$STATE_DIR/devices/pending.json" "$STATE_DIR/devices-reset-backup-$(date +%Y%m%d-%H%M%S)-pending.json"