instaloader: 2FA not working

Session file does not exist yet - Logging in.
Enter Instagram password for _____:
Enter 2FA verification code: XXXXXX
2FA error: This code is no longer valid. Please request a new one.
Enter 2FA verification code:

This happens again and again, I even tried setting up a 2FA app, but this did not work (I read the issue and you guys dont support it)

instaloader --version
4.7.4

Any help would be appreciated, thank you!

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Reactions: 47
  • Comments: 18 (2 by maintainers)

Most upvoted comments

Adding comment to keep this alive.

+1 on this issue: 2FA error: This code is no longer valid. Please request a new one.

We will track all updates related to this issue here, I recommend to use the subscribe or watch feature of github to get informed about updates.

Until this is fixed, the workaround described in https://instaloader.github.io/troubleshooting.html#login-error can be used.

The workaround does not work with firefox containers either. Had to start a whole new profile, log in there, export with 615... script which also wouldn’t just run from git-cloned directory, had to create a venv to pip install the instaloader lib. This is really cumbersome and I see no excuse for at least integrating that script into main app.