react-notion-x icon indicating copy to clipboard operation
react-notion-x copied to clipboard

fix response 401 due to auth token not passed as bearer token

Open wenwkich opened this issue 3 years ago • 3 comments
trafficstars

This update should fix the issue that passing authToken but still getting 401 response

It should be passed as Authorization bearer token according to this notion page: https://developers.notion.com/docs/authorization

wenwkich avatar Mar 31 '22 13:03 wenwkich

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

react-notion-x – ./

🔍 Inspect: https://vercel.com/saasify/react-notion-x/DeJd8L24wFGUrSkkEJpyTkd4Dqrd
✅ Preview: https://react-notion-x-git-fork-wenwkich-fixauthtoken-saasify.vercel.app

react-notion-x-minimal-demo – ./

🔍 Inspect: https://vercel.com/saasify/react-notion-x-minimal-demo/BTcbwgF2Jtoyue7EQarx2xE8hF8m
✅ Preview: https://react-notion-x-minimal-demo-git-fork-wenwkich-fi-cb67d7-saasify.vercel.app

vercel[bot] avatar Mar 31 '22 13:03 vercel[bot]

@transitive-bullshit Could you please review this whenever you are available? This will fix a major bug with private pages.

Pipe-Runner avatar Apr 02 '22 15:04 Pipe-Runner

I don't believe this is how the notion private API is intended to be authorized (which is what notion-client uses). If something changed there, then it will take some time for me to test.

If you're talking about the official, public notion API, then this PR doesn't apply. Check out https://github.com/NotionX/react-notion-x/pull/256 for my WIP on supporting it.

Note, however, that using the official, public notion API is not well supported since a lot of blocks don't contain enough info to display properly.

transitive-bullshit avatar Apr 03 '22 22:04 transitive-bullshit