Public documents
Public documents are documents with the isPublic
flag set to true. They can be viewed by anyone, but can only be annotated by members of the document (by default).
To make a document public, you can use the Document.edit
API, or pass the isPublic
option when calling createDocument
.
Creating a public document
Editing a document to be public
#
Joining public documentsUsers have the ability to join public documents without an invite. This is required to annotate on the document.
To add the current user to a public document, use the Document.join API.
join(): Promise<boolean>
#
Returns a promise that resolves to a boolean representing that the operation was successful. Throws an error if the document is not public.
#
Check if a user can join a documentBefore calling Document.join
, you may want to check if the user is allowed to join the document.
To do this, use the Document.canJoin
API.
canJoin(): Promise<boolean>
#
Returns a boolean representing if the user can join the document.
#
Getting a list of public documentsA list of all documents can be fetched with the getPublicDocumentPaginator API.