jckleiner / notion-backup

Automatic Notion workspace backup to Google Drive, Dropbox, pCloud, Nextcloud or to your local machine.
90 stars 36 forks source link

error code 403 while login sequence #6

Closed breakinlabs closed 1 year ago

breakinlabs commented 1 year ago

Hi,

since two days i'm not able to backup my notion data. I have found out so far that there must be an error in the getTokenV2 function. The request is answered with a 403 error. There may have been a change in the API as it worked fine until, 12/14/2022.

13:57:07.764 [main] INFO com.greydev.notionbackup.NotionClient - DOWNLOADS_DIRECTORY_PATH ...
13:57:07.765 [main] INFO com.greydev.notionbackup.NotionClient - Using export type: markdown
13:57:07.765 [main] INFO com.greydev.notionbackup.NotionClient - Flatten export file tree: false
13:57:08.084 [main] WARN com.greydev.notionbackup.NotionClient - 403
Exception in thread "main" java.util.NoSuchElementException: No value present
    at java.base/java.util.Optional.orElseThrow(Optional.java:382)
    at com.greydev.notionbackup.NotionClient.getTokenV2(NotionClient.java:198)
    at com.greydev.notionbackup.NotionClient.export(NotionClient.java:106)
    at com.greydev.notionbackup.NotionBackup.main(NotionBackup.java:56)
breakinlabs commented 1 year ago

 I can limit the error to a block through Cloudflare

Rundfunk commented 1 year ago

I am getting the same error as well. With a daily run, my last successful backup was made on the 13th of December (2022-12-13).

jckleiner commented 1 year ago

As you thought, the problem was that Notion changed their API which broke the programatic login. This happened before as well but it seems like they will stick with their changes and won't revert it back. I've updated the tool and documentation to work around this problem. Please see the documentation.