A Discord bot that embeds Instagram posts, reels, and albums using Components V2, with one-at-a-time album pagination.
Built with .NET 10 and NetCord. Deploy with the included Dockerfile.
Public posts work without any account. Age-restricted posts need a logged-in session:
- Set
Instagram:CookieHeaderto cookies exported from a browser where you are logged in (sessionid,ds_user_id,csrftoken,mid,rur,ig_did), or - Set
Instagram:UsernameandInstagram:Passwordso the bot can re-login automatically when the session expires (two-factor accounts are not supported).
Rotated cookies are persisted to Instagram:SessionStatePath; mount that path in Docker so the session survives restarts. Treat cookies and passwords as secrets: use environment variables (Instagram__CookieHeader, Instagram__Username, Instagram__Password) or an untracked appsettings.Production.json (excluded from Docker builds via .dockerignore).
https://discord.com/oauth2/authorize?client_id=1540429876706680945