Error: Invalid API or resource

As I'm a new Joplin user, I deleted everything and started again and also revoked/replaced the OneDrive auth but I still get the same error....

Important to know. Thank you, srm39

I had the same problem and got it working again by deleting everything. The problem is that Joplin has no way force a resync with Onedrive and so it does not "forget" the badly formatted deltaLink that it uses because of Microsofts mistake.

This fix in the Github issue should work. Basically it removes the local database. I havent tested it, but I i think if could work and would be much easier than my way described below. Not matter what you are doing you should backup your data!

My way to fix it was much more complicated and lots of try and error.Therefore o I am not sure if the steps below a correct. So i cannot promise that this is going to work. Please have backups of your data available. Depending on your amount of notes it will take some time, because it involves multiple resyncs.

  1. I removed the apps on my iPhone and iPad. Be aware that all data on your devices that is not synced will be gone! I personally stopped using the apps when I got this error the first time so it wasnt a problem for me.
  2. I changed the sync target of my desktop app (Ubuntu, Flatpak) to a local folder to have a backup of all my data. (I also created a backup of the Onedrive directory manually.) After the sync finished I closed Joplin.
  3. I removed the the API token (same as @foglcz). seems to be unnecessary
  4. I deleted the .config\joplin-desktop folder. Better to move it to another place to have a backup. I think that just removing Joplin is not enough because this directory is not removed when you uninstall Joplin and the database is stored in this directory. Thats why it did not work for @srm39
  5. I restarted Joplin (there should be not data). Set up sync with the local folder and after that sync finished changed the sync target to OneDrive. I had to authorize Joplin again after that had to wait for the sync to finish, again. I will think to a new folder in your Onedrive directory.
  6. In reinstalled to apps on mobile devices.

Please let me know if one of the methods works for you. Perhaps there is also a faster way to do it.

3 Likes

Hello Yann1k, thank you so much for your des cription. But can you explain how to remove the API token, pls?

Update: I didn't remove the API, but I re-installed the desktop app. After taht I removed the folder .config\joplin-desktop. Finally I installed Joplin again and it's working fine now. Will do the same for the other clients as well...

Good to hear that you do not have to remove the API token. Perhaps that also makes other steps unnecessary. I changed my answer accordingly.

Did you try to just remove the database at first?

Just for documentation. You can revoke the API Token here:

I tried to just remove the .config\joplin-desktop directory without deinstall Joplin first. But this was not successful. Joplin didn't start properly. So I deinstalled it and installed it new. I think the important step is to remove the .config directory.
Meanwhile I have 2 desktops "refreshed" and 1 Android client. For Android it was sufficient to deinstall the App and insatll it again.
So for the moment I'm happy again....

Update: Just tried again to uninstall/delete all traces of Joplin on OneDrive and on C:Drive, reinstalled and it seems to be syncing without error on OneDrive. Only difference is that I used latest Windows Build to install from (1.4.19) which with hindsight perhaps I should have checked before.

Now starting to re-import notebooks exported from Evernote and keeping fingers crossed it works.

If there are a lot of notes/notebooks to import, am I correct that the most efficient sequence of events is:

  1. Install on Windows PC
  2. Import all notes/notebooks
  3. Enable encryption
  4. Install on mobile (iPhone & iPad)?

Thank you.

Problem solved on my side. OneDrive personal.
Windows 10 sync: OK
Android sync: OK
iOS sync: OK
Linux: Will check later today.

I didn't had to clean any cache, just closed and reopened the app.

Well, I was also having problems on Debian. I solved it by:

  1. Making a backup of my notes;
  2. Closing the app (I didn't have to uninstall it);
  3. Deleting both joplin (joplin-desktop and @joplin) folders from .config;
  4. Cleaning android app data;
  5. Syncing everything again on both desktop and android.

Was very happy to find when I woke up this morning that whatever was causing the error had been resolved & I didn't need to do anything, always good :wink:

Was it? I'm confused about this error. As I understand it, I need to update the apps to fix it but it seems it's fixing itself for some users.

Anybody still having this issue or is it miraculously solved?

I can also confirm that this is now fixed; it seems that microsoft fixed it on their end - I haven't updated neither my Windows 10 or android apps, and the sync just magically started working.

I noticed that it did sync a large amount of notes - all of them possibly - so microsoft might be just forcing a resync of everything upon getting an invalid token. I don't know.

The sync works now though without any issues :slight_smile:

Fixed (mostly). All ok on Desktop (Windows) and iPhone (iOS 14.2). Set up on iPad (iOS 14.2), sync and encryption added, but over 1200 sync errors:

OneDriveApi::exec: Cannot parse JSON error: JSON parse error: Unexpected EOF.

EXACTLY the same data on desktop and iPhone so why this on iPad? I refuse on principle to tap 'retry' 1200 times to fix this. Have tried to sync many times and no change.

Any advise greatly appreciated.

Thanks for confirming. The apps handle the "resyncRequired" error that OneDrive can emit, so maybe they've decided to do that to fix the problems for everybody who's trying to sync with an invalid delta link. And if they do that, it indeed means that re-downloading everything is required.

Same here, iPad, iPhone and Windows 10 are now syncing, where yesterday I was getting various sync errors reported.

I agree that it's odd, but without doing anything all my clients have started syncing again without any trace of errors.