splitbee / notion-api-worker

Notion as CMS with easy API access
MIT License
1.56k stars 197 forks source link

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

Open ctbwx opened 3 years ago

ctbwx commented 3 years ago

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 3 years ago

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…]()

toughyear commented 2 years ago

same issue here.

Lucaslpena commented 2 years ago

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.