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

Use actual API credentials #2

Open
yannbolliger opened this issue Mar 24, 2022 · 8 comments
Open

Use actual API credentials #2

yannbolliger opened this issue Mar 24, 2022 · 8 comments

Comments

@yannbolliger
Copy link
Owner

Maybe we can use the official Notion API to get a token, then use the old workflow.
At least, one should be able to provide login credentials instead of the rather hacky token_v2.

@shahrukhalam
Copy link

I was not able to use the CLI as there was no file_token in cookies, I guess it is related to this issue, right?

@yannbolliger
Copy link
Owner Author

I was not able to use the CLI as there was no file_token in cookies, I guess it is related to this issue, right?

@shahrukhalam No, this was #3 and has been fixed with the latest release. Please also check the updated README.

@shahrukhalam
Copy link

shahrukhalam commented Apr 13, 2023

@shahrukhalam No, this was #3 and has been fixed with the latest release. Please also check the updated README.

@yannbolliger But, I was not able to find it in the cookies 🤔
I have followed the ReadMe & I guess it didn't change related to how to get file_token

In one of the comments on Issue #3, there is a mention of url of zip file, is that the way? if yes, what's it?

@yannbolliger
Copy link
Owner Author

yannbolliger commented Apr 16, 2023

@shahrukhalam I just retried the cookie explanation in Firefox. I see both cookies (file_token, token_v2) even if I log in with a fresh private mode tab. Maybe try that once and make sure to check for cookies in the cookies/storage tab of the developer tools – not on a single request.

@shahrukhalam
Copy link

shahrukhalam commented Apr 26, 2023

@yannbolliger Ah, I was using Safari, now i am able to see them in Chrome
Thanks much for the help 💚

@kaedea
Copy link

kaedea commented Jun 12, 2023

Hey, @shahrukhalam
Did you know is there an offical Notion API to export Notion Data or to get cookies token? I used https://notion.so/api/v3/loginWithEmail to retrieve cookies token ago, but it seems been banned by Notion right now.

@louislspn
Copy link

For those wondering why the file_token is not present in cookies : you need to export something at least one time from your browser in order to store this token.

After that, copy file_token and token_v2 and it should work fine.

@yannbolliger
Copy link
Owner Author

Did you know is there an offical Notion API to export Notion Data or to get cookies token? I used https://notion.so/api/v3/loginWithEmail to retrieve cookies token ago, but it seems been banned by Notion right now.

Yes, this is the original goal & intention of this issue, to use the official API to get tokens/credentials in an official way. This would also mean that you don't have to recreate tokens every 90 days.
If someone here is willing to help/provide a PR, you are more than welcome.

Also, thanks @louislspn for adding that explanation.

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

No branches or pull requests

4 participants