#2807·instagrapi

[BUG] Your version of Instagram is out of date. Please upgrade your app to log in to Instagram.

Author: noneherelCreated Sep 18, 2026Updated Sep 23, 2026
Labelsbug

What broke?

A problem when I try to log in, while it requires a verification code (I guess because of verficiation code requirement).

Affected area

login / challenge

Minimal reproduction code

python
import instagrapi

cl = instagrapi.Client()

cl.login("username*", "password*")
print(cl.sessionid)

Full traceback

pytb
Traceback (most recent call last):
  File "C:\Users\HP\AppData\Local\Programs\Python\Python313\Lib\site-packages\instagrapi\mixins\private.py", line 509, in _send_private_request
    response.raise_for_status()
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "C:\Users\HP\AppData\Local\Programs\Python\Python313\Lib\site-packages\requests\models.py", line 1167, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error:  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\HP\dallelha-project\inst-session.py", line 5, in <module>
    cl.login("****", "*******")
    ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\HP\AppData\Local\Programs\Python\Python313\Lib\site-packages\instagrapi\mixins\auth.py", line 806, in login
    return self.login_legacy(verification_code=verification_code)
           ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\HP\AppData\Local\Programs\Python\Python313\Lib\site-packages\instagrapi\mixins\auth.py", line 900, in login_legacy
    logged = self.private_request("accounts/login/", data, login=True)
  File "C:\Users\HP\AppData\Local\Programs\Python\Python313\Lib\site-packages\instagrapi\mixins\private.py", line 726, in private_request
    raise e
  File "C:\Users\HP\AppData\Local\Programs\Python\Python313\Lib\site-packages\instagrapi\mixins\private.py", line 709, in private_request
    self._send_private_request(endpoint, **kwargs)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\HP\AppData\Local\Programs\Python\Python313\Lib\site-packages\instagrapi\mixins\private.py", line 611, in _send_private_request
    raise UnknownError(**last_json)
instagrapi.exceptions.UnknownError: Your version of Instagram is out of date. Please upgrade your app to log in to Instagram.

Observed result

It returned: instagrapi.exceptions.UnknownError: Your version of Instagram is out of date. Please upgrade your app to log in to Instagram.

Expected result

  • Log in successfully
  • Gives the sessionid

instagrapi version

3.0.5

Python version

3.13.5

Operating system

Windows 10

Login method

username/password

Proxy used?

no

Can you reproduce on current master?

no

Raw API response or payload sample

json

Additional context

I have tried to log in with another account that doesn't require a "verification code", and it worked successfully and returned the sessionid as expected: 3921*****%3Abam5Erb2ZfwWOL%3A8%***************GVp7S3sdYnMlfKYH0-6g