POST /{ig-user-id}/media
Type | Description |
---|---|
If creating containers for product tagging, the app user must have an admin role on the Business Manager that owns the IG User's Instagram Shop. | |
If creating containers for product tagging, the IG User must have an approved Instagram Shop with a product catalog containing products. | |
If the app user was granted a role on the Page via the Business Manager, you will also need one of:
If creating containers for product tagging, you will also need: | |
The app user whose token is used in the request must be able to perform |
The following are the specifications for Reels:
The following are the specifications for a Reels cover photo:
POST https://graph.facebook.com/{api-version}/{ig-user-id}/media ?image_url={image-url} &is_carousel_item={is-carousel-item} &caption={caption} &location_id={location-id} &user_tags={user-tags} &product_tags={product-tags} &access_token={access-token}
POST https://graph.facebook.com/{api-version}/{ig-user-id}/media ?media_type=VIDEO &video_url={video-url} &is_carousel_item={is-carousel-item} &caption={caption} &location_id={location-id} &thumb_offset={thumb-offset} &product_tags={product-tags} &access_token={access-token}
POST https://graph.facebook.com/{api-version}/{ig-user-id}/media ?media_type=REELS &video_url={reel-url} &caption={caption} &cover_url={cover-url} &location_id={location-id} &thumb_offset={thumb-offset} &share_to_feed={share-to-feed} &access_token={access-token}
Carousel containers only. To create carousel item containers, create image or video containers instead (reels are not supported). See Carousel Posts for complete publishing steps.
POST https://graph.facebook.com/{api-version}/{ig-user-id}/media ?media_type={media-type} &caption={caption} &location_id={location-id} &product_tags={product-tags} &children={children} &access_token={access-token}
POST https://graph.facebook.com/{api-version}/{ig-user-id}/media ?image_url={video-url} &media_type={media-type} &access_token={access-token}
POST https://graph.facebook.com/{api-version}/{ig-user-id}/media ?video_url={video-url} &media_type={media-type} &access_token={access-token}
Placeholder | Value |
---|---|
| API version. |
| App user's app-scoped user ID. |
Key | Placeholder | Description |
---|---|---|
|
| Required. App user's User access token. |
|
| A caption for the image, video, or carousel. Can include hashtags (example: Not supported on images or videos in carousels. |
|
| Required for carousels. Applies only to carousels. An array of up to 10 container IDs of each image and video that should appear in the published carousel. Carousels can have up to 10 total images, vidoes, or a mix of the two. |
|
| For Reels only. The path to an image to use as the cover image for the Reels tab. We will cURL the image using the URL that you specify so the image must be on a public server. If you specify both |
|
| For images only and required for images. The path to the image. We will cURL the image using the URL that you specify so the image must be on a public server. |
|
| Applies only to images and video. Set to |
|
| The ID of a Page associated with a location that you want to tag the image or video with. Use the Pages Search API to search for Pages whose names match a search string, then parse the results to identify any Pages that have been created for a physical location. Include the Not supported on images or videos in carousels. |
|
| Required for videos, carousels, stories, and reels. Applies only to videos, carousels, stories, and reels. Set to |
|
| Required for product tagging. Applies only to images and videos. An array of objects specifying which product tags to tag the image or video with (maximum of 5; tags and product IDs must be unique). Each object should have the following information:
For example:
|
|
| For Reels only. When Neither value determines whether the reel actually appears in the Reels tab because the reel may not meet eligibilty requirements or may not be selected by our algorithm. See reel specifications for eligibility critera. |
|
| For videos and reels. Location, in milliseconds, of the video or reel frame to be used as the cover thumbnail image. The default value is |
|
| Applies only to images and carousels. An array of public usernames and |
|
| Required for videos and reels. Applies only to videos and reels. Path to the video. We cURL the video using the passed-in URL, so it must be on a public server. |
A JSON-formatted object containing an IG Container ID which you can use to publish the container.
Video uploads are asynchronous, so receiving a container ID does not guarantee that the upload was successful. To verify that a video has been uploaded, request the status_code
field on the IG Container. If its value is FINISHED
, the video was uploaded successfully.
{ "id":"{ig-container-id}" }
POST graph.facebook.com/17841400008460056/media ?image_url=https//www.example.com/images/bronzed-fonzes.jpg &caption=#BronzedFonzes! &user_tags=[ { username:'kevinhart4real', x: 0.5, y: 0.8 }, { username:'therock', x: 0.3, y: 0.2 } ]
{ "id": "17889455560051444" }
GET /{ig-user-id}/media
Get all IG Media on an IG User.
GET /{ig-user-id}/stories
endpoint instead.Type | Description |
---|---|
If the app user was granted a role on the Page via the Business Manager, you will also need one of: |
This endpoint supports time-based pagination. Include since
and until
query-string paramaters with Unix timestamp or strtotime
data values to define a time range.
GET graph.facebook.com/17841405822304914/media
{ "data": [ { "id": "17895695668004550" }, { "id": "17899305451014820" }, { "id": "17896450804038745" }, { "id": "17881042411086627" }, { "id": "17869102915168123" } ] }
This operation is not supported.
This operation is not supported.