You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Status 429: Too many requests
Ignore 429: Continue login
Traceback (most recent call last):
File "/Users/m/go/src/github.com/2l/code/automation/lib/python3.8/site-packages/instagrapi/mixins/private.py", line 298, in _send_private_request
response.raise_for_status()
File "/Users/m/go/src/github.com/2l/code/automation/lib/python3.8/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 "/Users/m/go/src/github.com/2l/code/automation/lib/python3.8/site-packages/instagrapi/mixins/auth.py", line 393, in login
logged = self.private_request("accounts/login/", data, login=True)
File "/Users/m/go/src/github.com/2l/code/automation/lib/python3.8/site-packages/instagrapi/mixins/private.py", line 445, in private_request
raise e
File "/Users/m/go/src/github.com/2l/code/automation/lib/python3.8/site-packages/instagrapi/mixins/private.py", line 432, in private_request
self._send_private_request(endpoint, **kwargs)
File "/Users/m/go/src/github.com/2l/code/automation/lib/python3.8/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 "/Users/m/go/src/github.com/2l/code/automation/lib/python3.8/site-packages/instagrapi/mixins/private.py", line 298, in _send_private_request
response.raise_for_status()
File "/Users/m/go/src/github.com/2l/code/automation/lib/python3.8/site-packages/requests/models.py", line 953, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error: Internal Server Error 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 "src/login.py", line 6, in <module>
cl.login(username="<username>", password="<password>", verification_code="<code>")
File "/Users/m/go/src/github.com/2l/code/automation/lib/python3.8/site-packages/instagrapi/mixins/auth.py", line 415, in login
logged = self.private_request("accounts/two_factor_login/", data, login=True)
File "/Users/mi/go/src/github.com/2l/code/automation/lib/python3.8/site-packages/instagrapi/mixins/private.py", line 445, in private_request
raise e
File "/Users/m/go/src/github.com/2l/code/automation/lib/python3.8/site-packages/instagrapi/mixins/private.py", line 432, in private_request
self._send_private_request(endpoint, **kwargs)
File "/Users/m/go/src/github.com/2l/code/automation/lib/python3.8/site-packages/instagrapi/mixins/private.py", line 374, in _send_private_request
raise ClientError(e, response=e.response, **last_json)
instagrapi.exceptions.ClientError: 500 Server Error: Internal Server Error for url: https://i.instagram.com/api/v1/accounts/two_factor_login/
I've tried a few different versions of this instagrapi. Specifically 1.16.3 and 1.15.20.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hey there. Super big fan of instagrapi.
I've been running into an issue when I attempt to use an account that has two factor enabled.
When I run this, I end up getting
I've tried a few different versions of this instagrapi. Specifically
1.16.3
and1.15.20
.Is there something that I'm doing wrong?
Beta Was this translation helpful? Give feedback.
All reactions