R
R
Rinten2019-07-09 13:39:55
Instagram
Rinten, 2019-07-09 13:39:55

Why is Instagram blocking mgp25/Instagram-API?

Need a script to receive messages from Instagram. Took https://github.com/mgp25/Instagram-API and am trying to run the examples (as recommended, from the command line, not through the browser). Started with twoFactorLogin.php to just login. But it doesn't work. The script makes several requests to Instagram, ending with a 200 OK code, but the last request returns a 400 code:

POST:  https://i.instagram.com/api/v1/accounts/login/
DATA: signed_body=4a6c0436dce476ff58c866a68fb8d36626a6b14cce8f666dc433775b6575a189.{"country_codes":"[{\"country_code\":\"1\",\"source\":[\"default\",\"sim\"]}]","phone_id":"f95660eb-31f3-47
f4-9970-eb0c89481706","_csrftoken":"MODun6az6xY6bOJGWWic66ONm6KtHidF","username":"мой_юзернейм","adid":"3ee9f489-6ced-4766-bbea-8997625fb646","guid":"d6981b6d-6a66-4816-8f66-696677ad3c66","
device_id":"android-dc1964f6a66e6b36","google_tokens":"[]","password":"мой_пароль","login_attempt_count":"0"}&ig_sig_key_version=4
← 400    312B
RESPONSE: {"message": "challenge_required", "challenge": {"url": "https://i.instagram.com/challenge/14278449224/gm0CaSJD1t/", "api_path": "/challenge/14278649624/gm06aSJD1t/", "hide_webview_
header": true, "lock": true, "logout": false, "native_flow": true}, "status": "fail", "error_type": "checkpoint_challenge_required"}

If after that you go to Instagram in the usual way, then the message "We detected an unusual login attempt" appears with the buttons "This is me" and "This is not me".
Question: am I somehow working with the API incorrectly and Instagram reacts, or does it basically block everything that is not native? And how can this be overcome?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Puma Thailand, 2019-07-10
@opium

Because there is an update on insta now and you need to constantly update api and work methods.
See what branches in mgp and issue

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question