Instagram Account Setup for Automation

How we setup our instagram accounts for automation

tech
knowhow

Introduction

Our journey to launch officiallyuselessfacts on Instagram was no easy feat. We started with a powerful library, but had to develop a creative workaround to overcome some challenges. Our first iteration used a login pattern that was ‘semi-good’, but it got the job done - for a while. The upload process was done by logging in twice, once for the post and again for the reel.

But we soon hit a wall with a frustrating “Blocked: Too many login requests” error. So we had to find a way to handle this, by either retrying the request with exponential sleeps in between or by reusing the session.

But that wasn’t our only hurdle. We discovered that our library didn’t dispose of the file handle after uploading the reel, which led to a sneaky issue that only occured on windows machines. We had to put on our thinking caps to find a workaround - a child process that called the reel upload. This basically closed the file handle with the process. Despite these obstacles, we persevered and successfully launched our Instagram account. Our first iteration may have had its challenges, but we didn’t let them hold us back. The account stayed unrestricted, and we learned valuable lessons that we could apply to future endeavors.

subprocess.run([sys.executable, './hacky_reel_upload.py', '-s', session_file, '-f', reel_path, '-t', thumbnail_img_file, '-d', desc])

Working solution

Our Instagram account was thriving with almost 30 posts in just a few days. We were on a roll, but we wanted to take it to the next level by reusing the same session ID to log in and make calls. It worked like a charm at first, and we thought we had outsmarted the system. But, a few hours later, our account was restricted, and we were left wondering why. As it turns out, our clever plan was not so clever after all. Instagrapi generated a different device info every time we logged in, which made it obvious to the Instagram AI that something was up. Imagine the red flags that went up when it saw multiple devices using the same session ID to make 24 calls a day - 12 posts and 12 reels. Thankfully, we were quick to realize our mistake and come up with a solution. We saved the device info generated during the first login and paired it with the session ID to make our calls seem as realistic as possible. We learned our lesson the hard way, but it only made us more determined to succeed on Instagram. Next step: Proxies

Proxies

As we delved into the world of online account creation, we quickly discovered that running multiple accounts per IP address was the key to success. However, when we looked into the cost of online proxy solutions, we were taken aback by the hefty price tag of around $50 per proxy per month. That meant each account would cost us $10 per month - a significant expense. But then, like a bolt from the blue, we stumbled upon an ingenious solution: NordVPN. With NordVPN, we could have up to six proxies per account, and the cost for a two-year subscription was only $100. That meant we could run up to 30 accounts at a mind-blowing cost of just $1.70 per account per month! The icing on the cake? Our NordVPN accounts run seamlessly in Docker containers on our server, making account creation and management a breeze.

We’ve been using the awesome soulteary/docker-nginx-forward-proxy Docker image to power our proxies, which allows us to seamlessly route traffic from localhost:808[nr] through the container using NordVPN. Our initial tests were a smashing success when we tried uploading regular posts, but we hit a major roadblock when we tried uploading reels - we were hit with a frustrating connection error! After some sleuthing, we uncovered the root of the problem - the default connection timeout limit for the forwarder was configured to a measly 10 seconds! This wasn’t nearly enough time for the API to analyze and upload our reels properly. But rather than give up, we decided to take matters into our own hands. We increased the timeout limit and lo and behold, it worked! We finally had a seamless vertical slice of automation, with traffic being routed flawlessly through our proxies. It’s been an absolute game changer for us, and we’re excited to see what else we can accomplish with this setup.

Account Creation - Key Know How

If you’re curious about creating a new account, it’s important to understand what information your browser collects that social media platforms can read. You can use the awesome tool https://gologin.com/check-browser to read your current fingerprint and analyze this information to get a good insight into what social platforms learn about us from our browsers. Armed with this knowledge, we set out on a quest to create accounts that would fly under the radar of AI bot detection.

Our account creation workflow

  1. 5 Accounts per Chrome profile
  2. Use a Chrome fingerprint spoofer extensions
  3. to modify your fingerprint and hide as many pieces of information as possible
  4. Use a VPN or mobile network; change IP with airplane mode (switch on/off)
    • It is not necessary to use the same ip you later run your accounts on
  5. Create Gmail account with fitting name email and phone number
  6. Use a phone number. Max 5 Accounts per phone number
    • This can be an online service or a throwaway sim. Reuse the same phone number used in 4.
  7. Create Facebook account with credentials
  8. When registering for Instagram use Sign In with Facebook’, desc: ‘Our finings suggest, that this increases the account credability for the detection AI
  9. Switch to Instagram Business Profile
  10. Create Facebook page for Instagram account
    • Same as 7
  11. Connect Instagram to Facebook Page
  12. Verify Meta business suite is working (business.facebook.com)