Jump to content

Permissions to retrieve note's metadata only


Recommended Posts

We synchronize documents from our app to Evernote and constantly update notes if document is changed in our system.

Before we try to update a note we request the note from API in order to check whether 1) it was deleted; 2) it was modified:

note = self.note_store.getNote(
	cached_metadata["guid"],
	withContent=False,
	withResourcesData=False,
	withResourcesRecognition=False,
	withResourcesAlternateData=False,
)

if note.deleted:
	raise exceptions.NotFoundError()

if note.contentHash != cached_metadata.get("content_hash"):
	raise exceptions.ConflictError()

It means users authorize us to "retrieve notes" which is not optimal: I don't want to store tokens that has access to all user notes and I don't want users to authorize us for it.

Is there a way to do what we do without having "retrieve notes" permissions associated with our tokens?

I was thinking about updating document without checking whether it was deleted and rely on exceptions but haven't found good documentation on it.
I was thinking maybe I can pass note content hash during update or an USN as described in API reference (https://dev.evernote.com/doc/reference/NoteStore.html#Fn_NoteStore_updateNoteIfUsnMatches) but again, it's not well documented for python SDK.
 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...