Instagram publishing uses the official content publishing API: create a media container, wait until its status is finished, then publish. Nothing is posted by automating instagram.com. Direct messages are not requested and are not sent.
Checked against Meta’s docs for content publishing and the publishing limit.
What you can send
Section titled “What you can send”| Kind | Rule |
|---|---|
| Image | One JPEG, up to 8 MB |
| Reel | One MP4 or MOV, from 3 seconds to 15 minutes, up to 1 GB. It can also appear on the main feed unless you turn that off. |
| Carousel | 2 to 10 images or videos. A video inside a carousel can be up to 60 seconds. A carousel counts as one publish. |
Captions can be 2,200 characters and at most 30 hashtags.
The account must be a professional account (Business or Creator). A personal account cannot publish. Switch the profile in the Instagram app, then reconnect.
Before each publish, the product reads content_publishing_limit. When usage reaches the total, the post waits. That quota is a rolling window, usually 24 hours. Creating containers has a separate limit. If publish times out or the response is unclear, the attempt is marked uncertain and is not published again.
How media is delivered
Section titled “How media is delivered”Instagram’s servers download the file from a public https link. The product builds that link from MEDIA_PUBLIC_ORIGIN and a signed /media/pull/{token} path. Bytes are not uploaded to Instagram from this server. If the public origin is missing or is not https, publish fails before any container is created.
Set up the Meta app
Section titled “Set up the Meta app”- Open developers.facebook.com/apps and create an app.
- The default login is Instagram Login. Add Instagram and API setup with Instagram login. For a Page-linked account, use Facebook Login for Business and set
INSTAGRAM_LOGIN_MODE=facebookon the server. - Add the redirect URI exactly:
{APP_PUBLIC_ORIGIN}/api/connect/instagram/callback. - Request
instagram_business_basicandinstagram_business_content_publish. Do not add message permissions. Facebook Login usesinstagram_basic,instagram_content_publish,pages_show_list, andpages_read_engagement, and publishes with the Page token. - Put the app id and secret in
INSTAGRAM_CLIENT_IDandINSTAGRAM_CLIENT_SECRET. - Set
MEDIA_PUBLIC_ORIGINandMEDIA_SIGNING_KEY(at least 16 characters). Instagram must be able to download the file without a login and without a redirect. - Set
INSTAGRAM_HTTP_ALLOW_NETWORK=1only on the server that may call Instagram. SetINSTAGRAM_GRAPH_VERSIONif your app is not on the default Graph version.
A short-lived token is exchanged for a long-lived token of about 60 days. Refresh extends a token that is still valid. Comments and replies are not part of this connection. See Inbox and listening.