# Error: Invalid API or resource

**URL:** <https://discourse.joplinapp.org/t/error-invalid-api-or-resource/12966>\
**Category:** Support\
**Created:** [8 December 2020 03:33 UTC](https://discourse.joplinapp.org/t/error-invalid-api-or-resource/12966 "2020-12-08T03:33:10Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pato](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/pato/32/5186_2.png) [@Pato](https://discourse.joplinapp.org/u/Pato)\
**Post date:** [8 December 2020 03:33 UTC](https://discourse.joplinapp.org/t/error-invalid-api-or-resource/12966/1 "2020-12-08T03:33:10Z")

</div>

Hi. After using "share -\> to joplin" option through the gallery on the android app, I've been having trouble syncing between the desktop and android version. On the mobile app, it fetches nonstop. After letting it fetch for 5 hours (after using the app for months, so there wasn't any need to download so many content), I cleared the app data, no luck. Now I get the message "Error: Invalid API or resource" on both apps (desktop and android). I tried deleting the "shared images" and then syncing, also re-encrypting but no luck.  
Joplin android version: 1.4.11  
Joplin desktop version: Joplin 1.5.4 (prod, win32), revision 42232fac8 (master)  
I'm also attaching today and yesterday's log, of when the problem started.  
Desktop's log: [log.txt](https://discourse.joplinapp.org/uploads/short-url/wpVxmzPq1MSAMhQod8DtrMK0W58.txt) (465.6 KB)  
Sync log android version: [syncReport-1607398114141.txt](https://discourse.joplinapp.org/uploads/short-url/bXS0A7dwSf6UKU0gFThkoIrQUd0.txt) (160.3 KB)

---

<div class="post-metadata">

**Author:** ![gumby](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/gumby/32/6043_2.png) [@gumby](https://discourse.joplinapp.org/u/gumby)\
**Post date:** [8 December 2020 04:02 UTC](https://discourse.joplinapp.org/t/error-invalid-api-or-resource/12966/2 "2020-12-08T04:02:17Z")

</div>

As mentioned [here](https://discourse.joplinapp.org/t/new-user-sync-on-ios-not-working/12947/8) I'm having similar problems with OneDrive as sync target for a MacBook and and iPhone.

Here's what looks to be the relevant bits from Joplin's console on the Mac:

 ![image](https://canada1.discourse-cdn.com/flex028/uploads/cozic/original/2X/9/9a30b514fd39d905c5a9bf3d372baa3761111ced.png)

---

<div class="post-metadata">

**Author:** ![srm39](https://avatars.discourse-cdn.com/v4/letter/s/87869e/32.png) [@srm39](https://discourse.joplinapp.org/u/srm39)\
**Post date:** [8 December 2020 10:42 UTC](https://discourse.joplinapp.org/t/error-invalid-api-or-resource/12966/3 "2020-12-08T10:42:03Z")

</div>

Same here. New user who started again from scratch this morning, now having same "Invalid API or resource" error.

---

<div class="post-metadata">

**Author:** ![johnny](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/johnny/32/3492_2.png) [@johnny](https://discourse.joplinapp.org/u/johnny)\
**Post date:** [8 December 2020 12:30 UTC](https://discourse.joplinapp.org/t/error-invalid-api-or-resource/12966/4 "2020-12-08T12:30:40Z")

</div>

This error seems been related to [this Microsoft Bug](https://github.com/OneDrive/onedrive-api-docs/issues/1408)

---

<div class="post-metadata">

**Author:** ![danpeig](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/danpeig/32/21657_2.png) [@danpeig](https://discourse.joplinapp.org/u/danpeig)\
**Post date:** [8 December 2020 13:20 UTC](https://discourse.joplinapp.org/t/error-invalid-api-or-resource/12966/5 "2020-12-08T13:20:33Z")

</div>

Same problem here....

---

<div class="post-metadata">

**Author:** ![Dylan](https://avatars.discourse-cdn.com/v4/letter/d/e95f7d/32.png) [@Dylan](https://discourse.joplinapp.org/u/Dylan)\
**Post date:** [8 December 2020 15:46 UTC](https://discourse.joplinapp.org/t/error-invalid-api-or-resource/12966/6 "2020-12-08T15:46:50Z")

</div>

Yeahh, I got this error on my PC. I sync between my PC (Windows 10), iPhone, and iPad. Today my PC wasn't able to download (from OneDrive) notes I created from my iPhone yesterday. It lists the last error as "Error: Invalid API or resource."

---

<div class="post-metadata">

**Author:** ![Gamegenorator](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/gamegenorator/32/3466_2.png) [@Gamegenorator](https://discourse.joplinapp.org/u/Gamegenorator)\
**Post date:** [9 December 2020 00:15 UTC](https://discourse.joplinapp.org/t/error-invalid-api-or-resource/12966/7 "2020-12-09T00:15:22Z")

</div>

It's strange but, I have a Win10 system showing the error and failing, but 2 other Win10 systems that work without any issue or notice, and an Android phone that's fine. I don't know enough about how Onedrive's API works to know what would cause a result like that.

---

<div class="post-metadata">

**Author:** ![laurent](https://avatars.discourse-cdn.com/v4/letter/l/ce7236/32.png) [@laurent](https://discourse.joplinapp.org/u/laurent)\
**Post date:** [9 December 2020 00:21 UTC](https://discourse.joplinapp.org/t/error-invalid-api-or-resource/12966/8 "2020-12-09T00:21:03Z")

</div>

It's good to see that Microsoft is actively working on the issue, and communicating about it. Hopefully they'll have a fix soon.

---

<div class="post-metadata">

**Author:** ![rxliuli](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/rxliuli/32/4083_2.png) [@rxliuli](https://discourse.joplinapp.org/u/rxliuli)\
**Post date:** [9 December 2020 01:08 UTC](https://discourse.joplinapp.org/t/error-invalid-api-or-resource/12966/9 "2020-12-09T01:08:43Z")

</div>

I also got this error here. . . Not sure when it will be resolved

---

<div class="post-metadata">

**Author:** ![gumby](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/gumby/32/6043_2.png) [@gumby](https://discourse.joplinapp.org/u/gumby)\
**Post date:** [9 December 2020 02:42 UTC](https://discourse.joplinapp.org/t/error-invalid-api-or-resource/12966/10 "2020-12-09T02:42:20Z")

</div>

7 hours ago over on the [github ticket](https://github.com/OneDrive/onedrive-api-docs/issues/1408) we see this:

 ![image](https://canada1.discourse-cdn.com/flex028/uploads/cozic/original/2X/6/6fd01684596990fe0a2ad30a0517418291f655bb.png)

Now, when I fire up the Joplin desktop app, I'm getting a different failure message:

![image](https://canada1.discourse-cdn.com/flex028/uploads/cozic/original/2X/b/b1125c994c961597e43a382c70ff5ae78baf47ad.png)

`2020-12-08 18:35:54: "Got unhandled error:", "undefined", "Not a valid URL: https://graph.microsoft.com/v1.0/drive/root:/Apps/Joplin 1/info.json:/content", "Error: Not a valid URL: https://graph.microsoft.com/v1.0/drive/root:/Apps/Joplin 1/info.json:/content `

Relevant portions of the log: [new-onedrive-broken.txt](https://discourse.joplinapp.org/uploads/short-url/hhMAMqegT296Xe5LhBiwy5eSoCe.txt) (5.2 KB)

---

<div class="post-metadata">

**Author:** ![laurent](https://avatars.discourse-cdn.com/v4/letter/l/ce7236/32.png) [@laurent](https://discourse.joplinapp.org/u/laurent)\
**Post date:** [9 December 2020 10:11 UTC](https://discourse.joplinapp.org/t/error-invalid-api-or-resource/12966/11 "2020-12-09T10:11:41Z")

</div>

@gumby, if they think it works now but it doesn't, it's probably a good idea to mention it in their GitHub thread.

---

<div class="post-metadata">

**Author:** ![lumogas](https://avatars.discourse-cdn.com/v4/letter/l/5fc32e/32.png) [@lumogas](https://discourse.joplinapp.org/u/lumogas)\
**Post date:** [9 December 2020 11:54 UTC](https://discourse.joplinapp.org/t/error-invalid-api-or-resource/12966/12 "2020-12-09T11:54:52Z")

</div>

Same problem. I can update on Android and it appears on the desktop, but what I change on Windows does not get synced to Android. Although I'm still getting the "Invalid API or resource" error. And it began happening recently, too.

---

<div class="post-metadata">

**Author:** ![reichi62](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/reichi62/32/6063_2.png) [@reichi62](https://discourse.joplinapp.org/u/reichi62)\
**Post date:** [9 December 2020 14:22 UTC](https://discourse.joplinapp.org/t/error-invalid-api-or-resource/12966/13 "2020-12-09T14:22:55Z")

</div>

Android worked still this Morning. Meanwhile all devices show the "Invalid API" error (Windows + Andoid).

---

<div class="post-metadata">

**Author:** ![danfoxley](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/danfoxley/32/6066_2.png) [@danfoxley](https://discourse.joplinapp.org/u/danfoxley)\
**Post date:** [9 December 2020 16:45 UTC](https://discourse.joplinapp.org/t/error-invalid-api-or-resource/12966/14 "2020-12-09T16:45:14Z")

</div>

On Windows 10 this morning (Pacific Time):

* * *

Completed: 09/12/2020 08:43  
Last error: Error: Invalid API or resource

---

<div class="post-metadata">

**Author:** ![Gamegenorator](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/gamegenorator/32/3466_2.png) [@Gamegenorator](https://discourse.joplinapp.org/u/Gamegenorator)\
**Post date:** [10 December 2020 00:34 UTC](https://discourse.joplinapp.org/t/error-invalid-api-or-resource/12966/15 "2020-12-10T00:34:57Z")

</div>

~~48 hours now and it's still dead, I agree with Laurent, someone should reply to the Github thread.~~

**Edit to avoid unnecessary pings:** Most clients are all syncing fine now, however one of my desktops will sync changes from other devices but will not upload changes similarly to what lumogas says his is doing. It still says `Last error: Error: Invalid API or resource` in the lower left. And log now shows:

> **Click to Expand**
>
> ````auto
> 2020-12-09 21:18:06: "Error: Invalid API or resource
> Code: invalidRequest
> Header: {"_headers":{"cache-control":["private"],"content-type":["application/json"],"request-id":["e4a7dabf-2d19-44cc-8516-a6761f703fcc"],"client-request-id":["e4a7dabf-2d19-44cc-8516-a6761f703fcc"],"x-ms-ags-diagnostic":["{\"ServerInfo\":{\"DataCenter\":\"West US\",\"Slice\":\"SliceC\",\"Ring\":\"5\",\"ScaleUnit\":\"001\",\"RoleInstance\":\"AGSFE_IN_49\"}}"],"strict-transport-security":["max-age=31536000"],"date":["Thu, 10 Dec 2020 05:18:05 GMT"],"connection":["close"],"content-length":["291"]}}
> Request: GET https://graph.microsoft.com/v1.0/drive/root/microsoft.graph.delta(token=[redacted])?select=name%2cfile%2cfolder%2cfileSystemInfo%2cparentReference%2cdeleted&token=[redacted] null null {"headers":{"Authorization":"bearer EwB4A8l6BAAU6k7+XVQzkGyMv7VHB/h4cHbJYRAAAQrqv4T6q5udKala3iDVc8SV+EtRny5lQf7bxDGCcTiyb956B/qHmBQxDC6SOlNlTBYrvvVmVwCnE/paVzh6L7tNMWs4pQSuApcIsLv5Ao023Q0v0ZoHyf8O4J4XS7I4PK6MAFEmn8wHdPW21oSQ85yNfSgVEvY6qvmcRMD+YSYDLmJuGTQrxnUOYjp7GTHFmQToNc24ekvPhfZy0sgV45GvpyAZKwaK6TVMbXhIJv/4LpUWw3B5tvo0sjU0DhbYDF8jQ34VGSd4d1es8OUyqG7104QhMkIJG4aM/Rv/tzvpQGdH0kmG/NN1ZHeugJgSUlMtBTuOnGrY4haYu1W6QmgDZgAACHCSCDYW0EzSSALD6BSHS2JZaqSZ9pPYwq1wJGLNjTLPTWqXOEX6kM4HEVVkXVhL61gzfiepHrnJ2R83x6tGonTKbYtLsBELgKknPUYaeS+uMVsE3xZo0yElSGrrmwT/VbYhNwuJU8x5fyfEK++LiWzlojCL8QiAhXnTGBLXZzOi
> Error: Invalid API or resource
> at OneDriveApi.oneDriveErrorResponseToError (C:\Users\Pierc\AppData\Local\Programs\Joplin\resources\app\node_modules\@joplin\lib\onedrive-api.js:130:19)
> at OneDriveApi.exec (C:\Users\Pierc\AppData\Local\Programs\Joplin\resources\app\node_modules\@joplin\lib\onedrive-api.js:276:24)
> at async OneDriveApi.execJson (C:\Users\Pierc\AppData\Local\Programs\Joplin\resources\app\node_modules\@joplin\lib\onedrive-api.js:346:20)
> at async FileApiDriverOneDrive.delta (C:\Users\Pierc\AppData\Local\Programs\Joplin\resources\app\node_modules\@joplin\lib\file-api-driver-onedrive.js:243:15)
> at async tryAndRepeat (C:\Users\Pierc\AppData\Local\Programs\Joplin\resources\app\node_modules\@joplin\lib\file-api.js:38:19)"
> 2020-12-09 21:18:07: "Operations completed: "
> 2020-12-09 21:18:07: "Total folders: 127"
> 2020-12-09 21:18:07: "Total notes: 434"
> 2020-12-09 21:18:07: "Total resources: 1671"
> 2020-12-09 21:18:07: "There was some errors:"
> 2020-12-09 21:18:07: "Error: Invalid API or resource
> Code: invalidRequest
> Header: {"_headers":{"cache-control":["private"],"content-type":["application/json"],"request-id":["e4a7dabf-2d19-44cc-8516-a6761f703fcc"],"client-request-id":["e4a7dabf-2d19-44cc-8516-a6761f703fcc"],"x-ms-ags-diagnostic":["{\"ServerInfo\":{\"DataCenter\":\"West US\",\"Slice\":\"SliceC\",\"Ring\":\"5\",\"ScaleUnit\":\"001\",\"RoleInstance\":\"AGSFE_IN_49\"}}"],"strict-transport-security":["max-age=31536000"],"date":["Thu, 10 Dec 2020 05:18:05 GMT"],"connection":["close"],"content-length":["291"]}}
> Request: GET https://graph.microsoft.com/v1.0/drive/root/microsoft.graph.delta(token=[redacted])?select=name%2cfile%2cfolder%2cfileSystemInfo%2cparentReference%2cdeleted&token=[redacted] null null {"headers":{"Authorization":"bearer EwB4A8l6BAAU6k7+XVQzkGyMv7VHB/h4cHbJYRAAAQrqv4T6q5udKala3iDVc8SV+EtRny5lQf7bxDGCcTiyb956B/qHmBQxDC6SOlNlTBYrvvVmVwCnE/paVzh6L7tNMWs4pQSuApcIsLv5Ao023Q0v0ZoHyf8O4J4XS7I4PK6MAFEmn8wHdPW21oSQ85yNfSgVEvY6qvmcRMD+YSYDLmJuGTQrxnUOYjp7GTHFmQToNc24ekvPhfZy0sgV45GvpyAZKwaK6TVMbXhIJv/4LpUWw3B5tvo0sjU0DhbYDF8jQ34VGSd4d1es8OUyqG7104QhMkIJG4aM/Rv/tzvpQGdH0kmG/NN1ZHeugJgSUlMtBTuOnGrY4haYu1W6QmgDZgAACHCSCDYW0EzSSALD6BSHS2JZaqSZ9pPYwq1wJGLNjTLPTWqXOEX6kM4HEVVkXVhL61gzfiepHrnJ2R83x6tGonTKbYtLsBELgKknPUYaeS+uMVsE3xZo0yElSGrrmwT/VbYhNwuJU8x5fyfEK++LiWzlojCL8QiAhXnTGBLXZzOi
> Error: Invalid API or resource
> at OneDriveApi.oneDriveErrorResponseToError (C:\Users\Pierc\AppData\Local\Programs\Joplin\resources\app\node_modules\@joplin\lib\onedrive-api.js:130:19)
> at OneDriveApi.exec (C:\Users\Pierc\AppData\Local\Programs\Joplin\resources\app\node_modules\@joplin\lib\onedrive-api.js:276:24)
> at async OneDriveApi.execJson (C:\Users\Pierc\AppData\Local\Programs\Joplin\resources\app\node_modules\@joplin\lib\onedrive-api.js:346:20)
> at async FileApiDriverOneDrive.delta (C:\Users\Pierc\AppData\Local\Programs\Joplin\resources\app\node_modules\@joplin\lib\file-api-driver-onedrive.js:243:15)
> at async tryAndRepeat (C:\Users\Pierc\AppData\Local\Programs\Joplin\resources\app\node_modules\@joplin\lib\file-api.js:38:19)"
> 2020-12-09 21:18:07: "Updating all notifications..."
> 2020-12-09 21:18:07: "Garbage collecting alarms..."```
> 
> ````

---

<div class="post-metadata">

**Author:** ![reichi62](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/reichi62/32/6063_2.png) [@reichi62](https://discourse.joplinapp.org/u/reichi62)\
**Post date:** [10 December 2020 07:30 UTC](https://discourse.joplinapp.org/t/error-invalid-api-or-resource/12966/16 "2020-12-10T07:30:53Z")

</div>

I still have the issues on all clients. Can you tell me, where I can find the log?

---

<div class="post-metadata">

**Author:** ![Gamegenorator](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/gamegenorator/32/3466_2.png) [@Gamegenorator](https://discourse.joplinapp.org/u/Gamegenorator)\
**Post date:** [10 December 2020 08:41 UTC](https://discourse.joplinapp.org/t/error-invalid-api-or-resource/12966/17 "2020-12-10T08:41:31Z")

</div>

On Windows: `C:\Users\%username%\.config\joplin-desktop`  
On Linux: `~/.config/joplin-desktop`  
I don't own a mac but I assume it would be similar to Linux  
I don't think there's a way to view the log on mobile

---

<div class="post-metadata">

**Author:** ![johnny](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/johnny/32/3492_2.png) [@johnny](https://discourse.joplinapp.org/u/johnny)\
**Post date:** [10 December 2020 10:00 UTC](https://discourse.joplinapp.org/t/error-invalid-api-or-resource/12966/18 "2020-12-10T10:00:07Z")

</div>

I am not that familiar with the delta request of the onedrive api but I think joplin permanently repeats the request to a invalid link which it has received due to the Microsoft bug. It seems that there is no routine implemented in joplin to automatically refresh this link in that unusual case.

So i think in order to solve the problem you would either need to delete the delta link from the database or log out from onedrive and login again. Unfortunately there is no way to do this from the GUI (which I think really should be implemented). You can find workarounds to achieve this on the forum though.

---

<div class="post-metadata">

**Author:** ![lumogas](https://avatars.discourse-cdn.com/v4/letter/l/5fc32e/32.png) [@lumogas](https://discourse.joplinapp.org/u/lumogas)\
**Post date:** [10 December 2020 10:54 UTC](https://discourse.joplinapp.org/t/error-invalid-api-or-resource/12966/19 "2020-12-10T10:54:48Z")

</div>

Hi,  
Could you provide links to the workarounds?

---

<div class="post-metadata">

**Author:** ![foglcz](https://avatars.discourse-cdn.com/v4/letter/f/4af34b/32.png) [@foglcz](https://discourse.joplinapp.org/u/foglcz)\
**Post date:** [10 December 2020 11:14 UTC](https://discourse.joplinapp.org/t/error-invalid-api-or-resource/12966/20 "2020-12-10T11:14:45Z")

</div>

_tl;dr_: for now I'd wait for Laurent to say what to do. If you need this working asap, **I think** that you would have to setup the Joplin app again (which means you have to backup everything to avoid data loss.)

* * *

I have the same problem on my Windows 10 and Android 11. Both of them are showing sync error "Invalid API or resource."

I have tried setting local sync target and then back OneDrive, and nothing happened. To force logout and login, I have logged into [https://account.live.com/consent/Manage](https://account.live.com/consent/Manage) and removed Joplins permission - that has forced relogin on both devices. However, when I relogged into windows app, I have got the same error again.

Error message is the same before and after relogin:

```auto
2020-12-10 07:33:28: "Error: Invalid API or resource
Code: invalidRequest
Header: {"_headers":{"cache-control":["private"],"content-type":["application/json"],"request-id":[" ***REDACTED***"],"client-request-id":[" ***REDACTED***"],"x-ms-ags-diagnostic":["{\"ServerInfo\":{\"DataCenter\":\"West Europe\",\"Slice\":\"SliceC\",\"Ring\":\"5\",\"ScaleUnit\":\"001\",\"RoleInstance\":\" ***REDACTED*** \"}}"],"strict-transport-security":["max-age=31536000"],"date":["Thu, 10 Dec 2020 06:33 GMT"],"connection":["close"],"content-length":["291"]}}
Request: GET https://graph.microsoft.com/v1.0/drive/root/microsoft.graph.delta(token=' ***REDACTED***')?select=name%2cfile%2cfolder%2cfileSystemInfo%2cparentReference%2cdeleted&token= ***REDACTED*** null null {"headers":{"Authorization":" ***REDACTED***
Error: Invalid API or resource
    at OneDriveApi.oneDriveErrorResponseToError (C:\Users\ptace\AppData\Local\Programs\Joplin\resources\app.asar\node_modules\@joplin\lib\onedrive-api.js:130:19)
    at OneDriveApi.exec (C:\Users\ptace\AppData\Local\Programs\Joplin\resources\app.asar\node_modules\@joplin\lib\onedrive-api.js:276:24)
    at async OneDriveApi.execJson (C:\Users\ptace\AppData\Local\Programs\Joplin\resources\app.asar\node_modules\@joplin\lib\onedrive-api.js:346:20)
    at async FileApiDriverOneDrive.delta (C:\Users\ptace\AppData\Local\Programs\Joplin\resources\app.asar\node_modules\@joplin\lib\file-api-driver-onedrive.js:243:15)
    at async tryAndRepeat (C:\Users\ptace\AppData\Local\Programs\Joplin\resources\app.asar\node_modules\@joplin\lib\file-api.js:38:19)"

```

Thing of note is `GET https://graph.microsoft.com/v1.0/drive/root/microsoft.graph.delta(token=' ***REDACTED***')`. I have checked and the delta token is the same when errors started (for me on 7th December), and it is the same today _even after relogin_. This suggest that Joplin caches the delta token (which was helpfully broken by microsoft on 7th Dec and they're not accepting it back.)

It seems that the hotfix right now is to completely setup the entire application again. I'm personally going to wait for advice 🙂

* * *

Thing of note: Onedrive for linux fixes the issue by removing the delta link - see commit here: [Handle case where API provided deltaLink generates a further API erro… · abraunegg/onedrive@335eab3 · GitHub](https://github.com/abraunegg/onedrive/commit/335eab326d43c34c321c58eea6d1c28b59025de3)

I see that @laurent has asked MS on what this means and I suspect that we'll get a fix soon. I'm sorry I cannot offer expertise (I don't know electron)

[Next page](https://discourse.joplinapp.org/t/error-invalid-api-or-resource/12966.md?page=2)
