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
[Bug]: 401 Client Error: Unauthorized for url: https://api.notion.com/v1/search #2396
Comments
Hey there, @wangshuai-wuhan! Nice to see you back with us. Hope you're doing well amidst these tech hiccups! Based on the error logs you've provided, it seems like the issue is related to the Notion API authentication. The "401 Client Error: Unauthorized" error typically occurs when the API token (also known as the integration token) is missing, incorrect, or has been revoked, leading to unauthorized access attempts to the Notion API. To resolve this issue, you can follow these steps:
Here's the relevant part of your code that sets up the authorization header, which is where you should ensure the correct token is being used: def _headers(self) -> dict[str, str]:
"""Get the headers for the Notion API"""
return {
"Authorization": f'Bearer {self.credentials["notion_integration_token"]}',
"Content-Type": "application/json",
"Notion-Version": "2022-06-28",
} Ensure that For more details, you can refer to the NotionConnector class in the quivr repository. I hope this helps! If you have any other questions or need further clarification, feel free to ask. Sources
|
What happened?
@StanGirard the quivr can answer a question from source now. but waiting a minitue, docker apper an 401 Client Error: Unauthorized for url: https://api.notion.com/v1/search。Will this be a problem for next question , like repeating cousume huge tokens. it‘ takes big price to use gpt 4。
i put quivr on wsl in window 11 and have to ues a vpn proxy fro opneai api . being not a porgramer ,i feel At a loss to meet those errors during many trials, i would like to subscribe your quivr app , but it still appear network Error. I am on the edge of giving up.
Relevant log output
Twitter / LinkedIn details
No response
The text was updated successfully, but these errors were encountered: