Skip to Content
Reader

Command the reader

POST
/reader/commands

Sends the command to the open OpenReader tab. goto also works from the library, opening the book there. play also needs audio:generate, since playing can generate speech. A browser starts audio only after the user has interacted with the page, so play can report needs_user_gesture. With no view open, the outcome is not_open; for goto, webUrl still opens the reader there.

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:control

Request Body

application/json
  1. body
type*unknown
documentId*string

The document to open.

Match^[a-f0-9]{64}$
at?string

A sentence key from search or the reader.

Lengthlength <= 512
page?integer

A PDF page, used when at is absent or not in the plan.

Range1 <= value <= 999999

Response Body

What the open reader view did with the command.

application/json
  1. response
outcome*string
Value in"done""sent""needs_user_gesture""not_found""failed""not_open"
webUrl*|

goto: opens the reader at the target.

curl -X POST 'https://reader.example/api/v1/reader/commands' \  -H 'Content-Type: application/json' \  -d '{  "type": "goto",  "documentId": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",  "page": 12}'
Example Response
{  "outcome": "done",  "webUrl": "string"}