---
title: "Read an original Library file shared with the API caller [read]"
method: GET
path: "/library/shared/{token}"
---

# Read an original Library file shared with the API caller \[read\]

`GET /library/shared/{token}`

## Request

- Base URL: `https://api.agentsky.dev/v1`
- URL: `https://api.agentsky.dev/v1/library/shared/{token}`
- Auth: HTTP bearer

Uses the caller's personal ast_ key, never a browser cookie. Requires the exact workspace membership and individual grant or workspace access. A workspace-scoped key cannot act in another audience workspace. raw=1 or download=1 streams original bytes. JSON snapshots expose source text or native Office bytes; private isolated browser grants require a browser login. A path query is rejected; choose the exact original file in the link ref.

## Path parameters

- `token` string, required

## Query parameters

- `raw` '1'
- `download` '1'

## Headers

- `Range` string

## Response `200`

Snapshot or original file bytes

- SharedLibrarySource
  - `name` string, required
  - `format` 'file' | 'site', required
  - `mediaType` string, required
  - `revision` string, required
  - `editable` boolean, required
  - `url` string, required: Same API path with raw=1; the original bytes, never a storage credential.
  - `maxBytes` integer, required
  - `text` string, nullable
  - `html` string
  - `office` string: Native Office source bytes as base64 when supported.
  - `history` object[], required
  - `previewUrl` string: Isolated browser preview when the reader has the required browser session, or the link is public.
  - `previewUnavailable` string, nullable
  - `sizeBytes` integer
  - `sharedBy` string, nullable
  - `libraryRef` union
    - object
      - `kind` 'agent_prompt', required
      - `agentId` string, required: The original agent user instruction file (AGENTS.md); never the combined runtime/system prompt.
    - object
      - `kind` 'file', required
      - `fileId` string, required
      - `sessionId` string
    - object
      - `kind` 'task_file', required
      - `taskId` string, required
      - `path` string, required
    - object
      - `kind` 'memory_note', required
      - `storeId` string, required
      - `memoryId` string, required
    - object
      - `kind` 'skill_file', required
      - `skillId` string, required
      - `path` string, required
    - object
      - `kind` 'artifact', required
      - `artifactId` string, required
    - object
      - `kind` 'platform_artifact', required
      - `artifactId` string, required
      - `path` string: Exact full path from the native artifact manifest; DesignSystem files use root plus the relative editable_files path. Omit only for the entire artifact entry.

## Other responses

- `206`: Requested original-file byte range
- `default`: Error — { error: { code, message } }

## Changes

- **2026-11-02** `e5e8f0229a99`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/agentsky/apis/agentsky-developer-api/changes/library/shared/:token/get.md)

---

[API](https://skmtc.dev/agentsky/apis/agentsky-developer-api.md) - [All operations](https://skmtc.dev/agentsky/apis/agentsky-developer-api/llms.txt) - [OpenAPI document](https://skmtc.dev/agentsky/apis/agentsky-developer-api/revisions/0d435187cd55?raw)
