github how to access instagram private followers

from api import privateAPI

api = privateAPI(username = "username", password = "password")

# Basic info about user
response = api.userInfo(user_id = "427553890")
info = response.json()

print ("USERNAME: ", info["user"]["username"])
# USERNAME:  leomessi

# Upload image. !!! Image must be square and have JPG format !!!
api.upload("path_to_image/image.jpg", "Description for image \n #hot #hacker #wow")

# Follow/unfollow user
api.follow(user_id = "427553890")
api.unfollow(user_id = "427553890")

# List of followers without max_id parameter (necessary for pagination)
response = api.listFollower(user_id = "427553890")
list_followers = response.json()

# List of followings with pagination
response = api.listFollowing(user_id = "427553890") # First page
list_followings = response.json()
next_max_id = list_followings["next_max_id"]

response = api.listFollowing(user_id = "427553890", max_id = next_max_id) # Second page

# List of user's media with pagination
response = api.userMedia(user_id = "427553890") # First page
next_max_id = response.json()["items"][-1]["next_max_id"]

response = api.userMedia(user_id = "427553890", max_id = next_max_id) # Second page
media_list = response.json()

Are there any code examples left?
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source