splitbee/notion-api-worker

Private pages are returning empty objects, even with Authorization Header, and user token.

ctbwx opened this issue · 3 comments

ctbwx commented

Hey, this could just be a user error, but I've tried both approaches and can't get private pages to return any BlockMap from the Splitbee Notion worker, or a personal worker that I spun up.

Personal Worker:

I created the notion worker from a local clone and uploaded it to CloudFlare:
Screen Shot 2021-02-21 at 6 27 38 PM
Screen Shot 2021-02-21 at 6 24 15 PM
Screen Shot 2021-02-21 at 6 24 07 PM

And this is what comes back when I search a private page

Screen Shot 2021-02-21 at 6 25 25 PM

This is what that said paid looks like in Notion:
Screen Shot 2021-02-21 at 6 25 46 PM

I got the token from the cookie in notion it's key was "token_v2" so I'm pretty sure I grabbed the right thing.

Please let me know if I'm doing something wrong. Thanks.

ctbwx commented

Oh also in my app, I'm trying this approach:

Screen Shot 2021-02-21 at 6 32 04 PM

And still getting this:
Uploading Screen Shot 2021-02-21 at 6.32.47 PM.png…

same issue here.

You need to take the cookie as noted in the read me. Here is how to view cookies.

Also just so you know, images don't seem to be working on private pages.