2026-01-20 10:29:13 +00:00
|
|
|
---
|
2026-01-30 03:15:10 +01:00
|
|
|
summary: "CLI reference for `openclaw devices` (device pairing + token rotation/revocation)"
|
2026-01-20 10:29:13 +00:00
|
|
|
read_when:
|
|
|
|
|
- You are approving device pairing requests
|
|
|
|
|
- You need to rotate or revoke device tokens
|
2026-01-31 16:04:03 -05:00
|
|
|
title: "devices"
|
2026-01-20 10:29:13 +00:00
|
|
|
---
|
|
|
|
|
|
2026-01-30 03:15:10 +01:00
|
|
|
# `openclaw devices`
|
2026-01-20 10:29:13 +00:00
|
|
|
|
|
|
|
|
Manage device pairing requests and device-scoped tokens.
|
|
|
|
|
|
|
|
|
|
## Commands
|
|
|
|
|
|
2026-01-30 03:15:10 +01:00
|
|
|
### `openclaw devices list`
|
2026-01-20 10:29:13 +00:00
|
|
|
|
|
|
|
|
List pending pairing requests and paired devices.
|
|
|
|
|
|
|
|
|
|
```
|
2026-01-30 03:15:10 +01:00
|
|
|
openclaw devices list
|
|
|
|
|
openclaw devices list --json
|
2026-01-20 10:29:13 +00:00
|
|
|
```
|
|
|
|
|
|
2026-02-17 14:08:04 +00:00
|
|
|
### `openclaw devices approve [requestId] [--latest]`
|
2026-01-20 10:29:13 +00:00
|
|
|
|
2026-02-17 14:08:04 +00:00
|
|
|
Approve a pending device pairing request. If `requestId` is omitted, OpenClaw
|
|
|
|
|
automatically approves the most recent pending request.
|
2026-01-20 10:29:13 +00:00
|
|
|
|
|
|
|
|
```
|
2026-02-17 14:08:04 +00:00
|
|
|
openclaw devices approve
|
2026-01-30 03:15:10 +01:00
|
|
|
openclaw devices approve <requestId>
|
2026-02-17 14:08:04 +00:00
|
|
|
openclaw devices approve --latest
|
2026-01-20 10:29:13 +00:00
|
|
|
```
|
|
|
|
|
|
2026-01-30 03:15:10 +01:00
|
|
|
### `openclaw devices reject <requestId>`
|
2026-01-20 10:29:13 +00:00
|
|
|
|
|
|
|
|
Reject a pending device pairing request.
|
|
|
|
|
|
|
|
|
|
```
|
2026-01-30 03:15:10 +01:00
|
|
|
openclaw devices reject <requestId>
|
2026-01-20 10:29:13 +00:00
|
|
|
```
|
|
|
|
|
|
2026-01-30 03:15:10 +01:00
|
|
|
### `openclaw devices rotate --device <id> --role <role> [--scope <scope...>]`
|
2026-01-20 10:29:13 +00:00
|
|
|
|
|
|
|
|
Rotate a device token for a specific role (optionally updating scopes).
|
|
|
|
|
|
|
|
|
|
```
|
2026-01-30 03:15:10 +01:00
|
|
|
openclaw devices rotate --device <deviceId> --role operator --scope operator.read --scope operator.write
|
2026-01-20 10:29:13 +00:00
|
|
|
```
|
|
|
|
|
|
2026-01-30 03:15:10 +01:00
|
|
|
### `openclaw devices revoke --device <id> --role <role>`
|
2026-01-20 10:29:13 +00:00
|
|
|
|
|
|
|
|
Revoke a device token for a specific role.
|
|
|
|
|
|
|
|
|
|
```
|
2026-01-30 03:15:10 +01:00
|
|
|
openclaw devices revoke --device <deviceId> --role node
|
2026-01-20 10:29:13 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Common options
|
|
|
|
|
|
|
|
|
|
- `--url <url>`: Gateway WebSocket URL (defaults to `gateway.remote.url` when configured).
|
|
|
|
|
- `--token <token>`: Gateway token (if required).
|
|
|
|
|
- `--password <password>`: Gateway password (password auth).
|
|
|
|
|
- `--timeout <ms>`: RPC timeout.
|
|
|
|
|
- `--json`: JSON output (recommended for scripting).
|
|
|
|
|
|
2026-02-04 18:59:44 -05:00
|
|
|
Note: when you set `--url`, the CLI does not fall back to config or environment credentials.
|
|
|
|
|
Pass `--token` or `--password` explicitly. Missing explicit credentials is an error.
|
|
|
|
|
|
2026-01-20 10:29:13 +00:00
|
|
|
## Notes
|
|
|
|
|
|
|
|
|
|
- Token rotation returns a new token (sensitive). Treat it like a secret.
|
|
|
|
|
- These commands require `operator.pairing` (or `operator.admin`) scope.
|