Permissions
What each interface requires, which permissions are granted by default, how to request more and how they get revoked.
Last updated
Permissions decide what an authorised site can actually do. The user grants them in the console; a page can only request, never grant.
Granted by default
Pairing grants these four:
| Permission | Allows |
|---|---|
printer.read | Printer list / capabilities / status / health alerts |
profile.read | Read profiles |
job.print | Silent printing (a real side effect) |
job.preview | Preview (the user confirms before paper) |
That is enough for most business apps.
The full list
| Permission | Allows | Risk |
|---|---|---|
printer.read | Printer list / capabilities / status / health alerts | Low |
printer.settings | Open the OS printer settings | Low |
profile.read | Read profiles | Low |
profile.write | Create / modify / delete profiles | Medium |
job.print | Silent printing (real paper) | High |
job.preview | Preview | Low |
job.read | Read jobs | Low |
job.cancel | Cancel jobs | Medium |
device.read / device.print | Query and print to directly attached devices | High |
scanner.read | Scanner list / capabilities / status | Medium |
scan.run | Start scans, read jobs, download pages | High |
scanner.read and scan.run are not in the default set, and each scan also
asks for confirmation on the computer. See scan.
Requesting more
Request them in the same pairing call so the user sees the full list in the prompt:
await client.ensureAuthorized(['job.read', 'job.cancel']);
// or pair explicitly:
await client.pair(['printer.read', 'job.print', 'job.read']);If the site is already authorised, authStatus() reports what it holds:
const status = await client.authStatus();
console.log(status.permissions);Request only what you actually use. A longer list makes it harder for the user to judge whether to accept.
When a permission is missing
Calling beyond your permissions gives PERMISSION_DENIED. This is an
explainable, recoverable state: tell the user to tick that permission for the
site in the console under Security & sites. Never suggest turning security off.
Permissions get revoked
Users can adjust permissions, revoke tokens or remove a site at any time. After a revocation:
- Established connections are dropped (when a token is revoked);
- Later calls go through pairing again.
So do not treat "authorised" as permanent: catch TOKEN_INVALID and
PAIRING_REQUIRED and run ensureAuthorized() again rather than leaving the UI
stuck on an error.