subzeroid / instagrapi

🔥 The fastest and powerful Python library for Instagram Private API 2024
https://hikerapi.com/p/bkXQlaVe
MIT License
4.21k stars 667 forks source link

[BUG] My Instagram account got locked #958

Open steevenakintilo opened 1 year ago

steevenakintilo commented 1 year ago

HI I've tried to run a simple program that will just look at cristiano ronaldo following count but when I ran the program it just locked my instagram account `def check_user_follower(): try: cl = Client() cl.login("x","x") user_id = cl.user_id_from_username("cristiano") Follower = cl.user_followers(user_id) print(Follower) except Exception as e: print(e)

` Traceback### ChallengeResolve: Unknown step_name "submit_phone" for "akintilo_steeven" in challenge resolver: {'step_name': 'submit_phone', 'step_data': {'phone_number': 'None'}, 'flow_render_type': 3, 'bloks_action': 'com.instagram.challenge.navigation.take_challenge', 'cni': 18327125647016490, 'challenge_context': '{"step_name": "submit_phone", "cni": 18327125647016490, "is_stateless": false, "challenge_type_enum": "SMS", "present_as_modal": false}', 'challenge_type_enum_str': 'SMS', 'status': 'ok'}

jarrodnorwell commented 1 year ago

@steevenakintilo you have not set up the settings.json which keeps a session, you have probably been banned because every time you run that code it will log in EVERY time. Also looks like you haven't attached a phone which may be required now?

steevenakintilo commented 1 year ago

Hi @official-antique how do I set up the settings.json file??? what do I need to put inside?

jarrodnorwell commented 1 year ago

Line 27-32 is what you're looking for, it'll use the created session after an initial login: instapy2_base.py