﻿<head><script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-4357510538660394"
     crossorigin="anonymous"></script></head># Sign agents in with access you control

> Canonical HTML: https://screenrig.ai/docs/authentication

Every agent, app, and script that operates your screens signs in with its own session. A person approves each session in the dashboard, chooses **Read only**, **Propose**, or **Manage**, and can revoke it from the **Access** page at any time.

## How sign-in works

screenRIG issues short-lived signed access tokens and long-lived refresh tokens. The bundled CLI stores both in its private configuration file and renews them automatically, so an agent never handles a token or pastes one into a conversation.

| Credential | Lifetime |
| --- | --- |
| Access token | 10 minutes |
| Refresh token | Rotates on every use. Expires 90 days after last use, up to a maximum of one year after sign-in |
| Sign-in code (`screenrig login`) | 24 hours |
| Service client token | 10 minutes, with no refresh token (the client requests a new token when needed) |

There are four ways to authenticate:

| Caller | How it signs in | Approved by |
| --- | --- | --- |
| New agent without an account | `screenrig agent enroll` creates the organization, project, and session in one command from an email address or an [AgentID](https://screenrig.ai/docs/cli.md#sign-in-with-agentid) claim code | Enrollment itself; the person's emailed invitation follows |
| Agent connecting to an existing account | `screenrig login` prints a code that a person approves in the dashboard | A project member in the dashboard |
| Connected app (Claude, ChatGPT, Grok) | Opens the screenRIG OAuth consent page (see [remote server](https://screenrig.ai/docs/mcp.md#connect-with-oauth)) | A project member on the consent page |
| Server, script, or CI job | A [service client](https://screenrig.ai/docs/service-clients.md) authenticates with its own private key or client secret | Created by a project member |

People sign in to the dashboard with a passkey or password, or through their organization's identity provider (see [single sign-on](https://screenrig.ai/docs/single-sign-on.md) and [user provisioning](https://screenrig.ai/docs/scim.md)).

## Sign in with `screenrig login`

Use `screenrig login` when you already have a screenRIG account and want an agent installation to access one of your projects. For a brand-new account, use `screenrig agent enroll` instead (see [Quickstart](https://screenrig.ai/docs/start.md)).

```sh
screenrig login
```

1. The CLI prints a dashboard URL and an eight-letter code (such as `BCDF-GHJK`), then waits for approval.
2. Open `https://screenrig.ai/dashboard/connect`, sign in, and enter the code—or open the full URL printed by the CLI, which pre-fills it.
3. The dashboard displays the request on a single screen: the device's installation name, request time and location, and code. Verify the code matches your terminal, adjust the project, access level, or capabilities if needed, click **Connect**, and confirm with your passkey (or password on accounts without a passkey, or an SSO sign-in within the last 10 minutes). The dashboard then opens the new agent entry.
4. The CLI saves the session, selects the approved project, and outputs `status: signed_in` with the project, organization, and access level.

Only approve sign-in requests that you initiated on your own computer. The dashboard never auto-approves requests on page load, and an expired code requires running `screenrig login` again.

| Flag | Effect |
| --- | --- |
| `--access read`, `--access propose`, or `--access manage` | Request **Read only**, **Propose**, or **Manage** access. Defaults to `manage`; the person approving makes the final choice |
| `--project prj_ID` | Suggest a target project for approval |
| `--name NAME` | Name this installation (up to 80 characters) |
| `--no-wait` | Return immediately with the URL, code, and a `login_` handle |
| `--resume login_ID` | Wait for a pending sign-in to be approved and save the resulting session |

When an agent needs to hand the sign-in URL to a person over another channel first, use `--no-wait`. The handle contains no secret, and the pending sign-in state stays in the CLI's private configuration file:

```sh
screenrig login --no-wait
screenrig login --resume login_HANDLE
```

Send the sign-in URL and code only to the person approving it, and keep them out of logs and shared channels.

<a id="add-a-project-or-raise-access"></a>

### Add a project or raise access

An already signed-in installation can run `screenrig login` again to add another project or upgrade a **Read only** or **Propose** project to **Manage**:

```sh
screenrig login --project prj_ID --access manage
```

Approving that request updates only the target project while preserving access to the installation's other projects. Run `screenrig project list` to see every accessible project and `screenrig project use ID` to switch between them.

## Read only, Propose, and Manage

Every session has one of three access levels, chosen by the person who approves it. Each level includes all permissions of the level below it.

| Action | Read only | Propose | Manage |
| --- | --- | --- | --- |
| List and read screens, playlists, media, events, and playback | Yes | Yes | Yes |
| Upload and edit media, capture screenshots, send feedback and support messages, draft ad creatives and campaigns | No | Yes | Yes |
| Create and update playlists; assign, schedule, or take over screens | No | Yes, queued as a [review](https://screenrig.ai/docs/agents.md#reviews) for human approval | Yes |
| Delete, pair, archive, reload, reboot, send toasts, set display power, tag screens, write application K/V, acknowledge/snooze/mute alerts, manage notifications and project settings, write the context of an object | No | No | Yes |
| Buy ad slots and fund ad campaigns | No | No | Yes |
| Read the URL of a webhook receiver, fleet link, or screen link | No (redacted) | No (redacted) | Yes |
| Counts toward the organization's agent request caps | Yes | Yes | Yes |

- **Read only:** Cannot modify resources or spend funds. Requests still count toward your organization's [agent request caps](https://screenrig.ai/pricing.md).
- **Propose:** Lets an agent prepare work while a person retains final control over what plays. Playlist and screen changes return `202` with `status: pending_review` and a review link, and nothing changes on screen until approved. Media uploads—as well as tag and folder changes on approved media—also wait for review: screens continue playing approved content until a reviewer decides; rejecting a change reverts modified items and keeps rejected uploads off screens. Propose sessions cannot delete resources, control screens, or spend funds.
- **Insufficient access:** Calling an action above a session's level returns `403 insufficient_access`, and the CLI names the next step: a person approves **Manage** with `screenrig login --access manage`.

Agent sign-ins default to **Manage**, while connected apps default to **Read only**. To downgrade an existing installation, disconnect it and sign in again with `screenrig login --access read` or `--access propose`. A session's stored level is never silently lowered—review policies below cap effective access to **Propose** without altering the underlying grant, and the **Access** page indicates when a cap is active.

<a id="capabilities"></a>

### Capabilities

Within its access level, a session can act only in the capability areas approved for it: `screens`, `content`, `playlists`, `advertising`, `reports`, and `project`. Enrollment grants all six on the newly created project. Running a command outside the approved capabilities returns `403 forbidden` and names the missing capability. Capabilities stay as approved. For more, run `screenrig login --project prj_ID` again; the capabilities the person approves then replace the project's.

## Require review for agent changes

Two project controls cap agents to **Propose** without requiring them to sign in again. Both are evaluated on every request and immediately cover existing sessions:

- **Require review for agent changes** (in dashboard [Settings](https://screenrig.ai/dashboard/settings)): When enabled, every agent, connected app, and service client in the project is capped at **Propose**, so changes to what plays wait in [Reviews](https://screenrig.ai/docs/agents.md#reviews) until a person approves them. Only the project owner or an organization administrator can toggle this setting, and turning it off requires passkey confirmation. Pending reviews remain open until decided. Turning it on is an Enterprise feature; turning it off and deciding the reviews that already wait stay open on every plan.
- **Can approve** (per member on the project's **Access** page): The project owner can always approve. A member without approval rights cannot decide reviews or give an agent **Manage** access, and any agents that member is responsible for are capped at **Propose**.

When multiple restrictions apply, the most restrictive level wins. Run `screenrig agent status` to inspect a session's stored `access`, its `effective_access`, and—when capped—`access_limited_by` (`project`, `person`, or `agent`). Signing in again cannot bypass these caps; only the project owner (or an organization admin for the project setting) can lift them. While a cap is active, approval screens only offer **Read only** and **Propose** and explain why **Manage** is unavailable.

## Agent controls

An organization admin on Enterprise can limit one agent or service client in every project of the organization at once. A control is set per agent or service client, and each part is optional:

- **Access ceiling.** `read` or `propose`. The agent or service client never goes above it in any project, whatever it was approved for. A ceiling of `propose` holds its changes for review, as Require review for agent changes does, and `access_limited_by` reads `agent`.
- **Areas.** Any subset of `screens`, `content`, `playlists`, `advertising`, `reports`, and `project`. The agent can use only those areas, within the capabilities it was approved for. A connected app lists only the tools of those areas, and a call outside them is refused with `403 forbidden`, whose hint names the controls.
- **Fleet approval.** The agent's changes to screens, and its campaign creates, changes, and deletes, become reviews that a person approves, whatever its access level. A screen change that has no review form, such as pairing, adopting, or provisioning a screen, is refused with `insufficient_access`. Fleet approval covers screens and campaigns; playlist writes, media, and ad inventory stay under the areas and the ceiling.

A control applies in every project of the organization within seconds. No token is revoked and the agent does not sign in again. An agent or service client with no control behaves as before, and an agent that has a control cannot create or change a service client, because the client would carry none of its limits.

Each control has an activity report of the agent's refusals and changes. Setting a control that gives an agent more, and removing any control, asks the admin for a fresh passkey, password, or single sign-on confirmation, and every change is recorded in the organization audit log. Setting a control is an Enterprise feature; removing one is open on every plan, and a control set before a downgrade stays in force until it is removed.

## Uploaders

An **uploader** is restricted strictly to selected media folders and playlists. Uploaders can upload files into those folders and add, replace, or remove pages (with optional start and end dates) on those playlists. They cannot read or modify other playlists, screens, schedules, members, tokens, fleet links, billing, or settings. A person on an agency's team is an uploader member; an agency's agent is an uploader service client. Uploaders are included on Plus and higher plans (see [Plus features](https://screenrig.ai/pricing.md#plus-features)).

- **Invite or assign:** On the dashboard's **Access** page, invite a new uploader or convert an existing member and select their allowed folders and playlists. With the CLI:
  - Invite a person: `screenrig invitations create --kind uploader --email designer@example.com --folder-id mfd_FOLDER --playlist-id pl_PLAYLIST`
  - Create an agency agent token: `screenrig service-client create --name "Agency agent" --uploader --folder-id mfd_FOLDER --playlist-id pl_PLAYLIST --secret-file agency.secret`
  Folder access applies only to the exact folders selected, not nested subfolders. The project owner can edit or revoke an uploader's scope at any time, taking effect on the next request.
- **Review vs. direct publish:** An uploader member's changes wait in [Reviews](https://screenrig.ai/docs/agents.md#reviews) until the project owner or a member who can approve decides them. The owner can let a member publish without review (`--access manage`) when inviting or assigning. Uploader service clients default to **Propose** unless created with another access level, and **Require review for agent changes** caps them to **Propose** just like any other agent. An uploader never approves reviews and never connects agents: an agent gets an uploader token instead.
- **Upload media and manage pages:** Run `screenrig media upload FILE --folder mfd_FOLDER --context "December promo for the lobby screens"` to upload into an allowed folder. Run `screenrig playlist page add pl_PLAYLIST --media med_IMAGE --from 2026-12-01 --until 2026-12-24` to add a page visible from December 1 through the end of December 24 in each screen's local time zone. Use `playlist page replace` to swap media or dates and `playlist page remove` to delete a page. Uploader-added pages must use images or videos from the uploader's folders, leaving other pages untouched. Several uploads in a row by one uploader join one review, so the owner approves them together, and a page still waiting in it can be replaced or removed; changes from a different uploader wait until that review is decided.
- **Dashboard experience:** Uploader members see a streamlined single-page **Upload** view listing only their assigned folders and playlists. They can upload files, add image or video pages with start/end dates, replace or remove their own pages, and withdraw a change that waits for review. Other pages in the playlist appear as **Set by the project**.
- **Scope errors:** Any request outside the assigned folders or playlists returns [`outside_upload_scope`](https://screenrig.ai/problems/outside-upload-scope), with `upload_scope` listing the allowed playlists and folders.

To restrict a member or agent to specific screen folders and screens rather than content, see [Permissions by screen folder](https://screenrig.ai/docs/permissions.md).

## The Access page

The dashboard's [Access](https://screenrig.ai/dashboard/access) page lists every person and integration with access to the current project:

| Section | What it lists |
| --- | --- |
| Pending | Sign-in and app connection requests awaiting approval |
| People | Members and open invitations |
| Agents | Enrolled or signed-in CLI and plugin installations |
| Connected apps | AI assistants connected via OAuth (one entry per app) |
| Service clients | Servers, scripts, and CI jobs with their keys and secrets |

Each entry displays how access was granted, who approved it, its access level and capabilities, and its creation and last-used timestamps. If a review policy caps an entry below its granted level, the row displays the effective level and reason (for example, *"Propose — project requires review"*). Click **Disconnect** to remove an agent or connected app, or **Revoke** to terminate a service client—both require passkey confirmation.

An organization can have up to 200 active agents across all of its projects. Beyond that limit, new sign-ins fail with `agent_limit_exceeded` until an existing agent is disconnected.

## Sign out and revoke

| Goal | Action |
| --- | --- |
| Sign out this installation | `screenrig logout` |
| Remove this installation from the current project | `screenrig agent disconnect --yes` |
| Revoke this installation across all projects | `screenrig agent revoke-identity --yes` |
| Disconnect any agent or connected app | Click **Disconnect** on the **Access** page |
| Revoke a service client | Click **Revoke** on the **Access** page, or run `screenrig service-client revoke ID --yes` |

`screenrig logout` revokes the session on the server before deleting local tokens. If the request might not have reached the server, the tokens stay, so running it again is safe. A **Read only** session can always disconnect itself. Disconnecting the project's last active agent requires `--allow-lockout`.

Once revoked, a session cannot renew, and existing access tokens stop working within seconds. Deactivating the person responsible for an agent ends its sessions in the same way, and deleting a project terminates all session access to that project.

## Session length

Each use of the refresh token moves its end 90 days forward, up to one year after sign-in. `screenrig doctor` shows when this installation's session ends, and every command warns in its last 30 days. To continue, a person approves a new `screenrig login`.

## Reference

These OAuth 2.0 endpoints power the bundled CLI, connected apps, and service clients. Agents working through the official plugin never call them directly.

| Item | Value |
| --- | --- |
| Issuer | `https://api.screenrig.ai` |
| Authorization server metadata | `https://api.screenrig.ai/.well-known/oauth-authorization-server` |
| Protected resource metadata | `https://api.screenrig.ai/.well-known/oauth-protected-resource/api` |
| Token endpoint | `https://api.screenrig.ai/oauth/token` |
| Device authorization | `https://api.screenrig.ai/oauth/device_authorization` |
| Authorization endpoint | `https://api.screenrig.ai/oauth/authorize` |
| Revocation | `https://api.screenrig.ai/oauth/revoke` |
| Grant types | `authorization_code` (PKCE `S256` only), `refresh_token`, `urn:ietf:params:oauth:grant-type:device_code`, `client_credentials` |
| Client authentication | `none`, `private_key_jwt` (`EdDSA`, `ES256`, `RS256`), `client_secret_basic` |
| Scopes | `access:read`, `access:propose`, `access:manage`, `identity`, plus capabilities `screens`, `content`, `playlists`, `advertising`, `reports`, `project` |
| Resources | `https://api.screenrig.ai/api` (default) and `https://api.screenrig.ai/mcp` |

Access tokens are Ed25519-signed JWTs in an `EdDSA`-only profile that follows RFC 9068 claim conventions (`typ: at+jwt`, `iss`, `aud`, `sub`, `client_id`, `scope`, `jti`, `iat`, `exp`). Treat them as opaque bearer tokens—send them in `Authorization: Bearer` headers and request a fresh token upon expiration.

Token endpoint errors return RFC 6749 JSON (`error`, `error_description`) with `Cache-Control: no-store`:

| `error` | Cause | CLI behavior |
| --- | --- | --- |
| `invalid_grant` | Session was revoked, expired, or reused, or code is invalid | `session_ended`: run `screenrig login` |
| `invalid_client` | Unknown client, or invalid key, secret, or assertion | `client_auth_failed` |
| `invalid_scope` | Requested access or capabilities exceed what was approved | `insufficient_access` |
| `invalid_target` | `resource` value other than the two listed above | `invalid_request` |
| `authorization_pending`, `slow_down` | Sign-in is still awaiting user approval | CLI continues polling |
| `access_denied` | User denied the sign-in request | `login_denied` |
| `expired_token` | Sign-in code expired | `login_expired`: run `screenrig login` |
| `temporarily_unavailable` | Temporary server error; retry shortly | `service_unavailable` |
| `rate_limited` | Rate limit reached; wait for `Retry-After` | `rate_limited` |

Requests to `/api` with an expired or revoked access token return `401` with `WWW-Authenticate: Bearer error="invalid_token"` (the CLI refreshes and retries once automatically). Requests exceeding a token's access level return `403 insufficient_access` with `WWW-Authenticate: Bearer error="insufficient_scope"` and the required `scope`. Credentials from a retired plugin or CLI version return `401` [`credential_retired`](https://screenrig.ai/problems/credential-retired)—update the official plugin and run `screenrig login`.

**Rate limits:** The token and revocation endpoints allow up to 1,200 requests per client IP per hour, 60 token renewals per session per hour, and 600 service-client tokens per client per hour. Sign-in starts are limited to 10 per IP per hour.

## Related

- [Quickstart](https://screenrig.ai/docs/start.md): install the official plugin and create your first project.
- [Service clients](https://screenrig.ai/docs/service-clients.md): authenticate servers, scripts, and CI jobs with client credentials.
- [Reviews](https://screenrig.ai/docs/agents.md#reviews): approve, reject, or request changes to agent proposals.
- [CLI reference](https://screenrig.ai/docs/cli.md#sign-in): `login`, `logout`, and agent management commands.
- [Remote server](https://screenrig.ai/docs/mcp.md): connect Claude, ChatGPT, or Grok.
