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.
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
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
- Settings → Local API → Access tokens → Generate token.
- Name: what uses it (for example "Nightly report script").
- Scopes: pick a preset or Custom:
- Read-only — every
…:readscope; - Browser control —
profiles:read,browser:open,browser:close,browser:control,jobs:read; - Full automation — every scope except
profiles:delete.
- Read-only — every
- Expires: In 7 days, In 30 days, In 90 days (preselected), In 365 days or Never. Expiry is enforced on every request.
- 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
GET /api/v1/profiles?page=1&page_size=50 HTTP/1.1
Host: 127.0.0.1:50380
Authorization: Bearer qlk_xxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxOnly the Authorization: Bearer header is accepted. Tokens in a query string (?token=) or cookies
are ignored.
When a token is refused
| HTTP | error.code | Meaning |
|---|---|---|
| 401 | auth_required | No Authorization header |
| 401 | invalid_token | Malformed, unknown or wrong token |
| 401 | token_expired | The expiry has passed |
| 401 | token_revoked | The token was revoked in Settings |
| 403 | sign_in_required | Nobody is signed in to Quin |
| 403 | account_mismatch | A different Quin account is signed in than the one that created the token |
| 403 | account_not_active | The account is suspended, banned, deleted or expired, or this device was revoked |
| 403 | local_api_disabled | Your administrator turned the Local API off for your account |
| 403 | insufficient_scope | The token lacks a scope; details.required lists the missing ones |
| 429 | too_many_failures | 10 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
| Scope | Grants | Endpoints |
|---|---|---|
profiles:read | Read profiles, groups, revisions, sync status, runtimes and configurations | GET /profiles, GET /profiles/{id}, GET /profiles/{id}/revisions, GET /profiles/{id}/sync-status, GET /profiles/{id}/runtime, GET /groups, GET /configurations |
profiles:write | Create and edit profiles and groups; save Cloud profiles | POST /profiles, PATCH /profiles/{id}, POST /profiles/bulk, POST /profiles/{id}/clone-config, POST /profiles/{id}/sync, POST /groups, PATCH /groups/{id} |
profiles:delete | Move profiles to Trash and restore them | POST /profiles/{id}/trash, POST /profiles/{id}/restore |
browser:open | Open browsers and read sessions | POST /browsers/open, GET /browsers, GET /browsers/{sid} |
browser:close | Close browsers | POST /browsers/{sid}/close, POST /browsers/close-all |
browser:control | Run actions in open browsers | POST /browsers/{sid}/actions, GET /browsers/{sid}/tabs, POST /browsers/{sid}/takeover, GET /files/{path} |
rpa:read | Read workflows, tasks, runs and schedules | GET /workflows, GET /workflows/{id}, GET /workflows/{id}/export, GET /tasks, GET /tasks/{id}, GET /runs/{id}, GET /schedules |
rpa:write | Create, edit, import and delete workflows and schedules | POST /workflows, PUT /workflows/{id}, DELETE /workflows/{id}, POST /workflows/{id}/publish, POST /workflows/import, POST /schedules, PATCH /schedules/{id}, DELETE /schedules/{id} |
rpa:execute | Run workflows and send signals to runs | POST /tasks, POST /runs/{id}/signal |
jobs:read | Read jobs | GET /jobs, GET /jobs/{id} |
jobs:cancel | Cancel jobs and tasks | POST /jobs/{id}/cancel, POST /tasks/{id}/cancel |
proxy:read | Read proxies (never their passwords) and check them | GET /proxies, POST /proxies/{id}/check |
proxy:write | Add, edit, remove and assign proxies | POST /proxies, PATCH /proxies/{id}, DELETE /proxies/{id}, POST /proxies/{id}/assign |
settings:read | Read browser runtimes and API status | GET /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:
{"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 thequinCLI read it automatically whenQUIN_API_TOKENis not set (the JavaScript SDK usesQUIN_API_TOKENor itstokenoption).quin auth clearremoves it. See CLI.- Your automation tool's encrypted credential store (for example n8n credentials).
QUIN_API_TOKENin 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 anaccount.revokedevent. - Signing in with another account, or an administrator turning off the Local API, makes existing tokens stop working without revoking them.