Instaloader 401 Unauthorized, 429 and "Login required": what to do

Checked on 2026-11-19.

These messages are Instagram refusing a request, not a mistake in your script. A 401 with "Please wait a few minutes before you try again." and a 429 mean Instagram will not serve this session or this address right now. "Login required" means the data is shown to logged-in users only. Below: what Instaloader's own documentation recommends, and what is left when that is not enough.

What each message means

What you seeWhat it is
401 Unauthorized - "fail" status, message "Please wait a few minutes before you try again."Instagram's answer, passed on. Instaloader prints the HTTP status with the status and message of Instagram's reply, retries, and then raises a ConnectionException.
429 Too Many RequestsInstagram's rate limit. Instaloader waits and retries by itself, with the advice "Please do not run multiple instances of Instaloader in parallel or within short sequence."
Login required. or Redirected to login page. Use --login or --load-cookies.A LoginRequiredException: you asked for something Instagram does not serve to logged-out visitors. The documentation marks what needs a login: hashtags, locations, stories, highlights, comments, geotags, your feed and saved posts, follower and followee lists, and private profiles.
400 Bad Request - "fail" status, message "feedback_required", also checkpoint_required and challenge_requiredInstagram is restricting the session or asking the account for a check. Instaloader ends the whole run on these, in the words of its source "to stop producing more requests".
Too many queries in the last timeNot an error. The documentation calls it "a notice that the rate limit has almost been reached, according to Instaloader's own rate accounting mechanism".

The troubleshooting page has no entry for the 401. The issue tracker has: the report titled with this exact message, #2511, has been open since February 2025 and is labelled a bug, and people in it get the error with and without a login. A comment in the code of version 4.16 describes one of Instagram's addresses for profiles the same way: it "is refused with HTTP 400 for some professional profiles, and with HTTP 401 or 429 for some sessions, both anonymously and when logged in". How long the wait is, neither the message nor the documentation says.

What Instaloader's documentation recommends

1. Upgrade first. The page tells you to "make sure to use the current version of Instaloader, especially when encountering many 429 errors". On the day this guide was checked that was 4.16, released on 26 October 2026, whose release notes list fixes for reading a profile's posts with and without a login.

Terminal
pip3 install --upgrade instaloader

2. One instance, and nothing else beside it. The rate controller assumes that nothing else is making requests at the same time, neither Instagram in a browser or an app nor a second Instaloader, and that no requests had been made when it starts. Hence the warning that "restarting or reinstantiating Instaloader often within short time is prone to cause a 429". A loop that starts a new process for every profile does exactly that.

3. Let it wait, or make it stop. After a 429, Instaloader "retries the request as soon as the temporary ban is assumed to be expired". --max-connection-attempts sets how often (3 by default, 0 means without end). For a scheduled job, --abort-on=302,400,429 ends the run on those answers instead of retrying.

4. Mind where it runs. "There have been observations that services, that in their nature offer promiscuous IP addresses, such as cloud, VPN and public proxy services, might be subject to significantly stricter limits for anonymous access. However, logged-in accesses do not seem to be affected." That is the script that works on your laptop and fails on a server.

5. For login errors, keep the session file. "We recommend to always keep the session file which Instaloader creates when using --login. If a session file is present, --login does not make use of the failure-prone login procedure." The other documented way in is --load-cookies, which takes the session of a browser in which you are already logged in.

In a Python script, catch the refusals instead of letting them end the program:

Python
import instaloader

L = instaloader.Instaloader(max_connection_attempts=1)   # one try, no waiting
try:
    profile = instaloader.Profile.from_username(L.context, "nasa")
    print(profile.followers)
except instaloader.ProfileNotExistsException:
    print("No such profile")
except instaloader.LoginRequiredException:
    print("Instagram shows this to logged-in users only")
except instaloader.ConnectionException as err:
    print("Instagram refused the request:", err)   # 401 and 429 arrive here

The state of things in November 2026

Two open reports are worth knowing before you spend an evening on your own setup.

  • #2726, opened in August 2026: Profile.from_username() answers 429 on the very first request, on several networks, with version 4.15.3. Version 4.16 changed how profiles are loaded, and in another thread two users wrote in early November that logged-out downloads worked again after updating to it.
  • #2792, "login and load-cookies are broken", opened on 30 October 2026 against version 4.16. On 19 November it was still open, with a fix proposed in a pull request that had not been merged.

So if you are on 4.16 and logging in fails, it may not be anything you did.

When that is not enough

  • Wait, then try once, from your own computer rather than a server. Retrying in a tight loop is what the rate controller warns against.
  • Log in with your own account. For everything that requires a login it is the only route, and the risk is yours: Instaloader is "an independent and unofficial project. Use at your own risk", Instagram can answer a logged-in session with a checkpoint or feedback_required, and the tracker has reports from people whose accounts were suspended. Read Instagram's Terms of Use before you automate anything with your account, do not use an account you cannot afford to lose, and never one that is not yours.
  • Use the official API when the account is your own or a business or creator account. The guide on follower counts shows the request, and the one on the Basic Display API's successors what Meta offers and for whom.
  • Use an HTTP API when public profile data is all you need, as shown below.

This guide leaves out ways to disguise a script or to hide where it runs. That is getting around Instagram's protection, not fixing an error.

Reading a public profile without Instaloader

If your script only reads profile numbers and the newest posts, an HTTP API can replace it. With Pipefetch one request returns a public profile, from any server, with no Instagram login:

Python
import os
import requests

res = requests.get(
    "https://pipefetch.com/v1/instagram/profile",
    params={"username": "nasa"},
    headers={"x-api-key": os.environ["PIPEFETCH_API_KEY"]},
    timeout=90,
)
if res.status_code == 404:
    print("No such account")  # not charged
else:
    res.raise_for_status()
    profile = res.json()["data"]
    print(profile["followerCount"], profile["postCount"], profile["isPrivate"])
    for post in profile["latestPosts"]:
        print(post["publishedAt"], post["url"], post["likeCount"], post["commentCount"])

A profile costs 2 credits. An account that does not exist answers 404 and costs nothing, and when Instagram does not answer you get a 502 that is not charged and can be retried. A new account has 100 free credits and needs no card. The reference lists every field.

Where it stops: it does not do what Instaloader is made for. There is no download of an account's whole history: latestPosts is about the 12 latest Reels and the newest grid posts. There are no stories, comments or follower lists, a private account returns its counts, name and bio only, and the media addresses stop working after some hours. It is not an official API, and Pipefetch is not affiliated with Instagram or Meta.

Which one should you use?

SituationUse
Archiving posts on your own computerInstaloader, current version, one instance, with patience
Stories, saved posts, private profiles you followInstaloader with your own login, at your own risk
Your own account, or business and creator accounts, officiallyThe official API
Profile numbers and the latest posts of public accounts, from a serverAn HTTP API such as Pipefetch

Try it with 100 free credits. No card needed. No login, cookies or proxies. Get an API key or read the docs.

Every source

YouTube

Websites

TikTok

Facebook

Google

Threads

LinkedIn

App stores

Steam

X

Pinterest

Airbnb

Real estate

Keywords

Job boards

Eventbrite

Shopify stores

Public tenders

All guides