Menu

#128 [question] Fooling Instagram and avoid get detected as automation

closed
nobody
None
2025-10-07
2025-08-26
Anonymous
No

Originally created by: Quimisagi

After using the CLI multiple times, Instagram may flag your account for automated behavior. This can prevent you from using the CLI with that account, and in the worst case, your account might even get suspended.
I understand this is not an easy issue to address, but ideally, we would want to prevent Instagram from flagging the CLI in the first place. What do you think triggers this flagging, and do you have any ideas on how we could avoid it? Should this be handled at the API level?

One measure to avoid having frequent requests to the server would be using mock data for testing, as proposed in [#122], but I don't think it would be enough as there may be a risk of this happening even in normal usage of the CLI.

For instance, I created a new account for testing proposes and got flagged after using the feed command after just a few times... I don't think its a problem exclusive of feed, right?

Related

Tickets: #122
Tickets: #149

Discussion

  • Anonymous

    Anonymous - 2025-08-26

    Originally posted by: Quimisagi

    Maybe there are some credentials saved on browser cache or cookies that we can use to fool server?

     
  • Anonymous

    Anonymous - 2025-08-27

    Originally posted by: supreme-gg-gg

    How often are the flagging occurring and how severe are they? I know this depends on various factors but I've tried using the CLI for months without getting any warning (for personal use only, with a separate dev account).

    I believe this is more of a instagrapi or typescript-private-api issue than instagram CLI unfortunately, perhaps a feature on their side would be suitable. They provide some suggestions on how to reduce the risk of being detected, but it might not always be applicable 😢

    The typescript client is supposed to solve this problem by reducing calls to the GraphQL API using the MQTT client instead for realtime chat [#74]. The issue with getting flagged after using feed is very weird since that's just very few API calls, might just be that new accounts are more vulnerable to getting detected by Instagram than old accounts. The very same thing happened to my new dev account that got flagged right after testing it... 😢

     

    Related

    Tickets: #74

  • Anonymous

    Anonymous - 2025-08-27

    Originally posted by: Quimisagi

    Definitely new accounts get flagged right away! Already happened to me 2 times :(

    Before I was using a personal account for a good amount of time, but eventually get flagged and couldn't use the CLI with it for a while, until today that I tried it again and its working without any problem! Probably even if you get flagged, after waiting a while it may get solved. :P

    Also, was wondering if the changes you made in ts-migration/main has something to do? Looks like some work was done on the client instance but I'm not very aware of it.

     
  • Anonymous

    Anonymous - 2025-08-27

    Originally posted by: supreme-gg-gg

    Glad to hear that it worked! The changes to client only updates the auth logic in terms of when to use session, when to use username, what to do when challenge or 2FA required, shouldn't really fix the detection issue. However, if you used to run into the Login Required bug now it should solve that since it will ask you to login again if session is invalid

     
  • Anonymous

    Anonymous - 2025-10-03

    Originally posted by: supreme-gg-gg

    This would theoretically get fixed by [#145] MQTT, up until now the experience has been really good and nothing happened to my account with the new client, but I will wait a bit longer to make the conclusion

     

    Related

    Tickets: #145

  • Anonymous

    Anonymous - 2025-10-07

    Ticket changed by: endernoke

    • status: open --> closed
     

Log in to post a comment.

Monday.com Logo