-
Notifications
You must be signed in to change notification settings - Fork 65
Error: Error: Request failed with status code 401 #18
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
Comments
Hi @doubley318, I unfortunately don't see anything wrong from the screenshots you provided - one thing you could try is to run this Chrome extension instead: https://github.com/joshcai/leetcode-sync-chrome/releases/tag/v0.0.1 It should set up all the variables for you in case there were any issues with copying the values over. |
Even I was facing this issue. It got fixed when I updated my secret with the latest values... Probably the cookie values expired. |
Two weeks later I encountered the same error. It looks like the token or session expires after 2 weeks. |
Do you think it's possible to fetch the token systematically from Leetcode? |
This seems to be a unique problem of Chinese leetcode. I encountered the same error for https://leetcode.cn/, but https://leetcode.com/, it works. |
Same here, looks like LeeetCode session has an expiry of two weeks. Added the issue here with details - #39 |
I faced this within a span of a few hours of running the action successfully today even though I had set the LEETCODE_SESSION and CSRF_TOKEN values just yesterday. |
I believe what happened was that the values already had a set date to expire when you obtained them. So you probably obtained them just a day before the expiry date. The validity of the values should certainly last more than a few days. Hope this helps! |
Helpful! |
Sorry! After I follow your tutorial, I always get this error and I don't know how to deal with it.

sync_leetcode.yml
And these file's contents are:
I don't know what went wrong.
Thank you for your help!
The text was updated successfully, but these errors were encountered: