Authentication and scopes

Bearer tokens for the Quin Local API — how to create, store, scope, expire and revoke them, and which scope each endpoint needs.

Local APIApplies to Quin Camoufox 0.7Updated 2 November 2026

Every Local API request except GET /api/v1/openapi.json needs a bearer token created in Quin Camoufox. Tokens are scoped, can expire, can be revoked at any time, and work only for the Quin account that created them.

Token format

Text
qlk_<12-character id>_<43-character secret>

The secret carries 256 random bits. Quin stores only a SHA-256 hash of the whole token together with its id, name, scopes, expiry, the account it was created under, and created/last-used times. The plaintext is shown once, when you generate it; Quin cannot show it again. Logs and the audit trail record the token id, never the token.

Create a token

  1. Settings → Local API → Access tokens → Generate token.
  2. Name: what uses it (for example "Nightly report script").
  3. Scopes: pick a preset or Custom:
    • Read-only — every …:read scope;
    • Browser control — profiles:read, browser:open, browser:close, browser:control, jobs:read;
    • Full automation — every scope except profiles:delete.
  4. Expires: In 7 days, In 30 days, In 90 days (preselected), In 365 days or Never. Expiry is enforced on every request.
  5. Generate, then copy the token from Your new token.

At most 50 tokens can be active at once. Tokens cannot be created, listed or revoked through the Local API itself.

Send the token

HTTP
GET /api/v1/profiles?page=1&page_size=50 HTTP/1.1
Host: 127.0.0.1:50380
Authorization: Bearer qlk_xxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Only the Authorization: Bearer header is accepted. Tokens in a query string (?token=) or cookies are ignored.

When a token is refused

HTTPerror.codeMeaning
401auth_requiredNo Authorization header
401invalid_tokenMalformed, unknown or wrong token
401token_expiredThe expiry has passed
401token_revokedThe token was revoked in Settings
403sign_in_requiredNobody is signed in to Quin
403account_mismatchA different Quin account is signed in than the one that created the token
403account_not_activeThe account is suspended, banned, deleted or expired, or this device was revoked
403local_api_disabledYour administrator turned the Local API off for your account
403insufficient_scopeThe token lacks a scope; details.required lists the missing ones
429too_many_failures10 failed authentications within a minute; wait 60 s (Retry-After: 60)

401 responses carry WWW-Authenticate: Bearer. Quin re-reads the account's status at most once a minute, so a suspension or ban takes effect within about a minute. RPA endpoints additionally return 403 rpa_disabled when RPA Plus is turned off for the account.

Scopes

ScopeGrantsEndpoints
profiles:readRead profiles, groups, revisions, sync status, runtimes and configurationsGET /profiles, GET /profiles/{id}, GET /profiles/{id}/revisions, GET /profiles/{id}/sync-status, GET /profiles/{id}/runtime, GET /groups, GET /configurations
profiles:writeCreate and edit profiles and groups; save Cloud profilesPOST /profiles, PATCH /profiles/{id}, POST /profiles/bulk, POST /profiles/{id}/clone-config, POST /profiles/{id}/sync, POST /groups, PATCH /groups/{id}
profiles:deleteMove profiles to Trash and restore themPOST /profiles/{id}/trash, POST /profiles/{id}/restore
browser:openOpen browsers and read sessionsPOST /browsers/open, GET /browsers, GET /browsers/{sid}
browser:closeClose browsersPOST /browsers/{sid}/close, POST /browsers/close-all
browser:controlRun actions in open browsersPOST /browsers/{sid}/actions, GET /browsers/{sid}/tabs, POST /browsers/{sid}/takeover, GET /files/{path}
rpa:readRead workflows, tasks, runs and schedulesGET /workflows, GET /workflows/{id}, GET /workflows/{id}/export, GET /tasks, GET /tasks/{id}, GET /runs/{id}, GET /schedules
rpa:writeCreate, edit, import and delete workflows and schedulesPOST /workflows, PUT /workflows/{id}, DELETE /workflows/{id}, POST /workflows/{id}/publish, POST /workflows/import, POST /schedules, PATCH /schedules/{id}, DELETE /schedules/{id}
rpa:executeRun workflows and send signals to runsPOST /tasks, POST /runs/{id}/signal
jobs:readRead jobsGET /jobs, GET /jobs/{id}
jobs:cancelCancel jobs and tasksPOST /jobs/{id}/cancel, POST /tasks/{id}/cancel
proxy:readRead proxies (never their passwords) and check themGET /proxies, POST /proxies/{id}/check
proxy:writeAdd, edit, remove and assign proxiesPOST /proxies, PATCH /proxies/{id}, DELETE /proxies/{id}, POST /proxies/{id}/assign
settings:readRead browser runtimes and API statusGET /runtimes

GET /status and GET /events accept any valid token; the event stream only carries events your scopes allow (see Events). GET /openapi.json needs no token.

Example refusal:

JSON
{"error": {"code": "insufficient_scope", "message": "This token lacks browser:control.",
           "details": {"required": ["browser:control"]}}}

Storing tokens safely

Any program running under your Windows account can read what you can read, including a token in a plain file, a script or an environment variable. Prefer:

  • quin auth set-token (or --stdin): stores the token for your Windows user, protected with Windows DPAPI, in %APPDATA%\quin-camoufox-sdk\token.bin. The Python SDK and the quin CLI read it automatically when QUIN_API_TOKEN is not set (the JavaScript SDK uses QUIN_API_TOKEN or its token option). quin auth clear removes it. See CLI.
  • Your automation tool's encrypted credential store (for example n8n credentials).
  • QUIN_API_TOKEN in the environment of the process that needs it, not in a shared file.

Give each script its own token with only the scopes it needs and an expiry.

Rotate and revoke

  • Rotate: generate a new token, switch the script to it, then revoke the old one. There is no single "rotate" call.
  • Revoke: the trash icon next to a token (Revoke) or Revoke all (asks you to type REVOKE ALL). A revoked token is refused on its next request; an open event stream re-checks its token every 30 seconds and ends with an account.revoked event.
  • Signing in with another account, or an administrator turning off the Local API, makes existing tokens stop working without revoking them.