Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wenwkich
Copy link

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

@vercel
Copy link

vercel bot commented Mar 31, 2022

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

@Pipe-Runner
Copy link

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

@transitive-bullshit
Copy link
Member

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 #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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants