Laurent Sarrazin

Software Engineer

Evernote API : how to get shared notes

This is the first article of a series that will try to describe some common tasks that developers try to achieve with the Evernote API.

For this first article, I'll explain how to access notes that another user has shared with you.

This tutorial uses python but the process is similar in other languages.

The first step is to get the linked (shared) notebook(s).

linked_notebooks = noteStore.listLinkedNotebooks(auth_token)

A linked notebook has a shareKey attribute that you will use to authenticate to the shared notebook

shareKey          = linked_notebook.shareKey
note_store_uri    = linked_notebook.noteStoreUrl
shared_note_store = Store(auth_token, NoteStore.Client, note_store_uri)
auth_result       = shared_note_store.authenticateToSharedNotebook(shareKey,auth_token)
share_token       = auth_result.authenticationToken

Now that you have a token, you can use it to search notes, for example

updated_filter = NoteFilter(words=' ')
offset         = 0
max_notes      = 40000
result_spec    = NotesMetadataResultSpec(includeTitle=True)

result_list = shared_note_store.findNotesMetadata(share_token, updated_filter, offset, max_notes, result_spec)

Alltogether now :

Previous post Next post
Back to home page

Share this post

Repost 0
To be informed of the latest articles, subscribe:

Comment on this post