Skip to Content
Reader

Get the open reader

GET
/reader

A reader view shares its live state only while an app the user approved holds a reader scope. A book is shared when its own setting says so, else by the user's default; until the user has chosen that default, the first call asks them. A document the user keeps from connected apps never appears, live or saved. Live state is kept briefly while OpenReader stays open and is never stored in the database.

Authorization

headerAuthorizationBearer <token>

Authorization code with S256 PKCE. Discover issuer metadata at /.well-known/oauth-authorization-server/api/auth and resource metadata at /.well-known/oauth-protected-resource/api/v1. Request the /api/v1 resource explicitly. The same token endpoint also supports the advertised OAuth device grant.

Scope: reader:read

Response Body

The open reader view that is sharing (source live), else the last document opened and its saved position (source saved).

application/json
  1. response
source*string
Value in"live""saved"
open*|

What an open OpenReader tab shows: a shared book (reader), the library or another page (library), or nothing an app may see (null).

Value in"reader""library"null
document*
segmentKey*|

The sentence the reader is at. Pass it as at= on a reader URL to open there.

segmentOrdinal*integer|null
page*|

The PDF page shown; null for other formats and saved state.

sentence*|

Text of the sentence the reader is at; live state only.

selection*|

Text the user has selected; live state only.

Lengthlength <= 2000
playback*|

Live state only.

Value in"playing""paused""preparing"null
progress*|

Saved reading progress from 0 to 1; saved state only.

updatedAt*number|null
webUrl*string

Opens the reader at this position.

Formaturi
Example Request
curl -X GET 'https://reader.example/api/v1/reader'
Example Response
{  "source": "live",  "open": "reader",  "document": {    "id": "string",    "name": "string",    "type": "pdf"  },  "segmentKey": "string",  "segmentOrdinal": 0,  "page": 0,  "sentence": "string",  "selection": "string",  "playback": "playing",  "progress": 0,  "updatedAt": 0,  "webUrl": "http://example.com"}