Unable to login using 2FA
I have 2FA enabled on my account and trying to login along with passing the auth code but for some reason the login always fails. I can login to the same account by disabling 2FA
Same here, I'm using Google Authenticator and put in the code, it says the Code is no longer valid and that I should request a new one, although the code is valid.
Code:
cl.login(username="username", password="12345", verification_code="414 603")
Error:
Traceback (most recent call last): File "C:\Users\Solba\AppData\Roaming\Python\Python39\site-packages\instagrapi\mixins\private.py", line 298, in _send_private_request response.raise_for_status() File "C:\Program Files\Python39\lib\site-packages\requests\models.py", line 953, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://i.instagram.com/api/v1/accounts/login/
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\Users\Solba\AppData\Roaming\Python\Python39\site-packages\instagrapi\mixins\auth.py", line 393, in login logged = self.private_request("accounts/login/", data, login=True) File "C:\Users\Solba\AppData\Roaming\Python\Python39\site-packages\instagrapi\mixins\private.py", line 445, in private_request raise e File "C:\Users\Solba\AppData\Roaming\Python\Python39\site-packages\instagrapi\mixins\private.py", line 432, in private_request self._send_private_request(endpoint, **kwargs) File "C:\Users\Solba\AppData\Roaming\Python\Python39\site-packages\instagrapi\mixins\private.py", line 348, in _send_private_request raise TwoFactorRequired(**last_json) instagrapi.exceptions.TwoFactorRequired: Two-factor authentication required
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\Users\Solba\AppData\Roaming\Python\Python39\site-packages\instagrapi\mixins\private.py", line 298, in _send_private_request response.raise_for_status() File "C:\Program Files\Python39\lib\site-packages\requests\models.py", line 953, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://i.instagram.com/api/v1/accounts/two_factor_login/
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Solba\PycharmProjects\Fiverr_and_Others\snuuuuilo1\main.py", line 98, in