API reference

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:

PermissionAllows
printer.readPrinter list / capabilities / status / health alerts
profile.readRead profiles
job.printSilent printing (a real side effect)
job.previewPreview (the user confirms before paper)

That is enough for most business apps.

The full list

PermissionAllowsRisk
printer.readPrinter list / capabilities / status / health alertsLow
printer.settingsOpen the OS printer settingsLow
profile.readRead profilesLow
profile.writeCreate / modify / delete profilesMedium
job.printSilent printing (real paper)High
job.previewPreviewLow
job.readRead jobsLow
job.cancelCancel jobsMedium
device.read / device.printQuery and print to directly attached devicesHigh
scanner.readScanner list / capabilities / statusMedium
scan.runStart scans, read jobs, download pagesHigh

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.

See also

On this page