> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wednesdayai.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# qr

# `wednesdayai qr`

Generate an iOS pairing QR and setup code from your current Gateway configuration.

## Usage

```bash theme={"dark"}
wednesdayai qr
wednesdayai qr --setup-code-only
wednesdayai qr --json
wednesdayai qr --remote
wednesdayai qr --client openclaw-user-client
wednesdayai qr --client openclaw-mentra-node
wednesdayai qr --client wednesdayai-glass-node
wednesdayai qr --url wss://gateway.example/ws --token '<token>'
```

## Options

* `--remote`: use `gateway.remote.url` plus remote token/password from config
* `--url <url>`: override gateway URL used in payload
* `--public-url <url>`: override public URL used in payload
* `--token <token>`: override gateway token for payload
* `--password <password>`: override gateway password for payload
* `--client <id>`: issue the bootstrap token for a specific gateway client id, storing that client's bounded profile. Known ids: `openclaw-even-g2-node`, `openclaw-mentra-node` (MentraOS glasses miniapp), `openclaw-user-client`, `wednesdayai-glass-node` (WednesdayAI Glass). Omitted keeps the broad setup profile. The client redeems the code on first connect and is paired silently; no `devices approve` step is needed.
* `--identity <key>`: link the bootstrap-paired device to this `session.identityLinks` identity on
  first connect. The key must already exist (`Unknown identity "<key>". Known identities: …`
  otherwise). With `--client openclaw-user-client`, `--identity` is **required** as soon as at
  least one identity exists:
  `--identity <name> is required with --client openclaw-user-client once identities exist. Run "wednesdayai identity list" to see them.`
  Applies only to the bootstrap setup code, so it cannot be combined with `--legacy`,
  `--remote`, `--token`, or `--password`. The stored-case key is recorded in the token and linked
  automatically when the device first connects, so no `devices link` step is needed. If the
  identity no longer exists at that point, the device still connects but is left unlinked. If the
  device is already linked to a different person, the connect is refused with
  `bootstrap_device_owned`: log out, or `devices remove` it, then pair again with a new setup
  code. `wednesdayai identity link <name> --qr` is a shortcut for this combination. See
  [Identities](https://docs.wednesdayai.dev/next/admin/gateway/identity) and
  [devices](https://docs.wednesdayai.dev/next/users/cli/devices.md#wednesdayai-devices-link-deviceid-identity-key).
* `--setup-code-only`: print only setup code
* `--no-ascii`: skip ASCII QR rendering
* `--json`: emit JSON (`setupCode`, `gatewayUrl`, `auth`, `clientId`, `identity`, `urlSource`)

## Notes

* `--token` and `--password` are mutually exclusive.
* `--client` applies only to the bootstrap setup code, so it cannot be combined with `--legacy`, `--remote`, `--token`, or `--password`. An unknown or profile-less client id exits non-zero. The id is normalized before it is matched: surrounding whitespace is trimmed and the value is lowercased, so `--client OpenClaw-User-Client` selects the same bounded profile as the canonical lowercase id.
* `--client openclaw-user-client` stores a bounded profile (operator role, `operator.sessions.read` + `operator.sessions.write`). Redemption binds the stored profile to the connecting client exactly: a token issued for one client id cannot be redeemed by another.
* `--client openclaw-mentra-node` stores a bounded operator-only profile (role `operator`, `operator.read` + `operator.write`). Tokens minted from it cover chat, session reads, `agents.list` and voice wake get/set on the broad operator read/write surface, but never the node role or the admin, approvals, pairing or talk-secret scopes. This code pairs the [MentraOS glasses](https://docs.wednesdayai.dev/next/admin/platforms/mentra-glass) miniapp.
* `--client wednesdayai-glass-node` stores a bounded profile with roles `node` + `operator` and `operator.read`, `operator.write` and `operator.approvals` scopes; approvals cover only exec approvals for the person the device is linked to, and tokens minted from it never carry the admin, pairing or talk-secret scopes. This code pairs [WednesdayAI Glass](https://docs.wednesdayai.dev/next/admin/platforms/wednesdayai-glass).
* When the resolved gateway URL is not loopback, the command prints one reminder naming the origin allowlist that governs the selected client: `gateway.webClient.allowedOrigins` for `--client openclaw-user-client`, and `gateway.controlUi.allowedOrigins` for every other client. The Control UI allowlist never admits the web client, so the two are not interchangeable.
* With `--remote`, if effectively active remote credentials are configured as SecretRefs and you do not pass `--token` or `--password`, the command resolves them from the active gateway snapshot. If gateway is unavailable, the command fails fast.
* Without `--remote`, local `gateway.auth.password` SecretRefs are resolved when password auth can win (explicit `gateway.auth.mode="password"` or inferred password mode with no winning token from auth/env), and no CLI auth override is passed.
* Gateway version skew note: this command path requires a gateway that supports `secrets.resolve`; older gateways return an unknown-method error.
* Bootstrap setup codes approve pairing silently: the first connect redeems the setup code, so no `devices approve` step is needed; use `wednesdayai devices list` to confirm the device. Legacy and shared-credential forms (`--legacy`, `--remote`, `--token`, `--password`) can require `wednesdayai devices list` followed by `wednesdayai devices approve <requestId>`.
* The bootstrap token is issued through the gateway RPC `device.bootstrap.issue` (`operator.admin`) when a gateway owns storage. When no gateway runs, `qr` opens the session database locally and issues the token in-process.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.