Skip to main content
GET
Returns one page of the plain text of a file on the task. It works like Get file text, but needs only the tasks:read scope, and only for files the task lists. Tracked changes in a Word document are kept. Read a long file page by page:
  1. Call without offset. The first page starts at character 0.
  2. While next_offset is not null, call again with offset set to next_offset.
  3. When next_offset is null, you have the last page.
total_chars is the length of the whole text, so you can tell how many pages are left. An offset at or past the end returns empty text and a null next_offset. A file is served only once its malware scan is clean. While the scan is still running, the response is 409 scan_in_progress; retry shortly. A file the scan flagged returns 404.

Authentication

Send an API key, or an OAuth access token with the tasks:read scope, as a bearer token in the Authorization header.

Path parameters

string
required
The task the file is on. Accepts a display id like #12 or the task’s UUID.
string (uuid)
required
An id from the task’s input_files or output_files, or from a comment’s or thread message’s file_ids. Attaching stores a copy with a new id, so the id you attached is not on the task.

Query parameters

integer
default:"0"
Character offset to start the page at. 0 or greater.
integer
default:"20000"
The most characters to return. 1 or greater. Values over 100,000 are treated as 100,000.

Response

string (uuid)
The file’s id.
string
This page of the text.
integer
Character offset of the first character in text.
integer | null
The offset to read the next page from. null on the last page.
integer
The number of characters in the whole text.

Errors

See Errors for the error format.