instapy-cli: [BUG] ClientError checkpoint_challenge_required

Describe the bug

I excute same command every day. Since today, Instagram seems to require an verification. Instapy-cli display a “challenge_required” message.

To Reproduce

instapy -u myuser -p mypassword -f https://i.imgur.com/EaWUsOs.jpg -t "Comment se faire des amis"

Expected behavior

Sending a working instagram post.

Logs If there are any errors or exceptions, add the logs to help explain your problem.

ClientError checkpoint_challenge_required (Code: 400, Response: {"message": "challenge_required", "challenge": {"url": "https://i.instagram.com/challenge/13063477860/GhKeUCVT2D/", "api_path": "/challenge/13063477860/GhKeUCVT2D/", "hide_webview_header": true, "lock": true, "logout": false, "native_flow": true}, "status": "fail", "error_type": "checkpoint_challenge_required"})

Env (please complete the following information):

  • OS: archlinux
  • Python: 3.7.3
  • instapy-cli Version: 0.0.12

About this issue

Most upvoted comments

Edit: Changed location and it’s working now.

What do you mean by changing the location ? the location of your vpn ?

Tried it again, and got a different error message:

ClientError URLError <urlopen error [Errno 8] nodename nor servname provided, or not known> (Code: 0, Response: )

Did a little googling, and it seems these errors are being thrown by the underlying instagram_private_api, as suggested by this issue. The diagnosis is that Instagram these errors indicate that Instagram has flagged an account as spammy.

In instagram_private_api’s README includes as a note recommending that users avoid excessive logins by caching the auth cookie.

Caching the auth cookie isn’t instapy-cli’s default behavior, correct? Is it an invokable option via the command line? If not, would you accept a pull request wherein we added this feature?