With Evernote API for iOS, I can create notebooks and new notes without any problems. However, once I try to get a list of notes in a certain notebook (of which I know the guid), I get this error:
2012-08-23 22:15:09.734 Meernotes[9900:c07] FN error: Error Domain=com.evernote.sdk Code=3 "The operation couldn’t be completed. (com.evernote.sdk error 3.)" UserInfo=0xa554c80 {parameter=authenticationToken}
So it appears as if I have problems with the authenticationToken. In order to create a notebook or notes, I need to be authenticated as well, so I don’t understand why I am not authenticated when it comes to listing notes in a notebook. Here is the code I’m calling:
EDAMNoteFilter *filter = [[EDAMNoteFilter alloc] initWithOrder:1 ascending:FALSE words:nil notebookGuid:guid tagGuids:nil timeZone:nil inactive:NO];
EvernoteNoteStore *noteStore = [EvernoteNoteStore noteStore];
[noteStore findNotesWithFilter:filter offset:0 maxNotes:[EDAMLimitsConstants EDAM_USER_NOTES_MAX] success:^(EDAMNoteList *list) {
//
NSLog(@"all notes in notebook: %@", list.notes);
} failure:^(NSError *error) {
//
NSLog(@"FN error: %@", error);
}];
OK, I just found the answer: I can’t list notes in notebooks with API Basic Access. I registered again an went for “full access”. Also, I had to register a new test user in the sandbox environment and register this user in my app to give my app full access to the sandbox user’s notes. Now everything is fine!