ioantsaf / hacked_insta_unliker

Python script to detect and remove suspicious likes from Instagram
GNU General Public License v3.0
10 stars 0 forks source link

Error occurs when signing in: checkpoint_challenge_required #3

Closed exurd closed 4 years ago

exurd commented 4 years ago

When I try to sign into my Instagram account, this error pops up:

Traceback (most recent call last):
  File "site-packages\instagram_private_api\client.py", line 523, in _call_api
  File "urllib\request.py", line 531, in open
  File "urllib\request.py", line 641, in http_response
  File "urllib\request.py", line 569, in error
  File "urllib\request.py", line 503, in _call_chain
  File "urllib\request.py", line 649, in http_error_default
urllib.error.HTTPError: HTTP Error 400: Bad Request

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "unliker.py", line 165, in <module>
  File "unliker.py", line 153, in main
  File "site-packages\instagram_private_api\client.py", line 208, in __init__
  File "site-packages\instagram_private_api\endpoints\accounts.py", line 50, in login
  File "site-packages\instagram_private_api\client.py", line 527, in _call_api
  File "site-packages\instagram_private_api\errors.py", line 125, in process
instagram_private_api.errors.ClientCheckpointRequiredError: checkpoint_challenge_required
[17800] Failed to execute script unliker

And this pops up on the Instagram website:

checkpoint_challenge

Looks like a major problem and needs to be fixed quickly. Using Version 1.0.3.

ioantsaf commented 4 years ago

This can happen sometimes when using the Instagram private API. Just unlock your account and run the script again.

exurd commented 4 years ago

Just unlock your account and run the script again.

What do you mean by unlocking your account? Can't find that option anywhere on the site nor the app. If you meant unprivating my account, it still didn't work. Got the same error.

ioantsaf commented 4 years ago

By "unlocking your account" I mean that: When the checkpoint_challenge error arises, your account is temporarily locked, and you can't use it. Click "This Was Me" and you will probably be presented with the option to unlock your account by receiving a code via email. Afterwards, you can try to use the script again. Also, make sure you run the script from the same network you use the app from (without VPNs etc that may make it look like you are logging in from another country).

exurd commented 4 years ago

Tried that and it still does the checkpoint_challenge error.

d0gkiller87 commented 4 years ago

It seems that the cookie value can be passed as a parameter (cookie = 'xxxx') to the Client constructor. https://github.com/ping/instagram_private_api/blob/master/instagram_private_api/client.py#L86

The validation checks cookie value so maybe it work with cookies? https://github.com/ping/instagram_private_api/blob/master/instagram_private_api/client.py#L205

ioantsaf commented 4 years ago

It seems that the cookie value can be passed as a parameter (cookie = 'xxxx') to the Client constructor. https://github.com/ping/instagram_private_api/blob/master/instagram_private_api/client.py#L86

The validation checks cookie value so maybe it work with cookies? https://github.com/ping/instagram_private_api/blob/master/instagram_private_api/client.py#L205

Yes, it's possible to use a saved session cookie to login, and I've tried it in the past.

But how is the user going to obtain the cookie? Extract it from his browser? I wanted to keep the script as simple as possible.

Also, if the activity is flagged as bot activity, the account will be locked (checkpoint_required) regardless of the authentication method (cookie vs user/pass).