Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Log in to Instagram

downloader login

The command prints where to find the sessionid cookie, reads it from a hidden prompt, checks it with Instagram and saves it. Other inputs:

downloader login --browser firefox
downloader login --cookies cookies.txt
pbpaste | downloader login

--browser reads the Instagram cookies from a browser signed in to instagram.com: firefox, chrome, chromium, brave or edge. When several profiles are signed in, the one whose cookies changed last wins. Firefox works on every system. Chromium browsers work on Linux and macOS: on Linux the password comes from the keyring through secret-tool, on macOS from the Keychain, which may ask for permission. On Windows they encrypt cookies with a key only the browser can read, so use Firefox or --cookies there.

--cookies reads a Netscape cookies.txt or a JSON export from a browser extension. Piped input is the sessionid value.

Requests go out without the session first, and Facebook requests never use it. The saved session is used only when Instagram refuses an anonymous request, which happens on blocked networks and for private accounts. Saved posts and comments always use it. When Instagram refuses the saved session as well, the command fails with session_refused; run downloader login again. Treat the session as a password: anyone who holds it can act as the account.

downloader whoami prints the account of the saved session. downloader logout deletes it.