### Get Eligible Products Sample Response Source: https://developers.facebook.com/docs/instagram-platform/instagram-api-with-facebook-login/product-tagging Example response from the catalog product search endpoint, showing tag-eligible products with their details, including product ID, name, review status, and variants. ```json { "data": [ { "product_id": 3231775643511089, "merchant_id": 90010177253934, "product_name": "Gummy Wombats", "image_url": "https://scont...", "retailer_id": "oh59p9vzei", "review_status": "approved", "is_checkout_flow": true, "product_variants": [ { "product_id": 5209223099160494 }, { "product_id": 7478222675582505, "variant_name": "Green Gummy Wombats" } ] } ] } ``` -------------------------------- ### Example Response for Live Media Source: https://developers.facebook.com/docs/instagram-api/reference/ig-user/live_media This is an example of a successful response when retrieving live media, showing details of a broadcast, owner, username, and comments. ```json { "id":"90010498116233", "media_type":"BROADCAST", "media_product_type":"LIVE", "owner":{ "id":"17841405822304914" }, "username":"jayposiris", "comments":{ "data":[ { "hidden": false, "id": "17907364514064687", "like_count": 0, "media": { "id": "17892642502701087" }, "text": "@jayposiris", "timestamp": "2021-08-17T21:23:07+0000", "username": "bztest0316_11", "from": { "id": "5895605157123796", "username": "bztest0316_11" } } ] } } ``` -------------------------------- ### Example Response for Creator Discovery Source: https://developers.facebook.com/docs/instagram-platform/instagram-api-with-facebook-login/creator-marketplace This is an example of the data structure returned when querying for creators in the marketplace. ```json { "data": [ { "id": "178414869381437360", "username": "xxx", "country": "BR", "gender": "female" }, { "id": "178414965628223823", "username": "xxx", "country": "IN", "gender": "male" } ] } ``` -------------------------------- ### Sample Response for Get Conversations Source: https://developers.facebook.com/docs/instagram-platform/instagram-api-with-instagram-login/conversations-api Example JSON response when successfully retrieving a list of conversations. Includes conversation IDs and the last updated time. ```json { "data": { "id": "" }, { "id": "" } ... ] } ``` -------------------------------- ### Example Request for Content Publishing Limit Source: https://developers.facebook.com/docs/instagram-api/reference/ig-user/content_publishing_limit This example demonstrates how to use curl to request the content publishing limit, specifying fields like quota_usage and rate_limit_settings, a 'since' timestamp, and an access token. ```bash curl -X GET \ 'https://graph.facebook.com/v25.0/17841405822304914/content_publishing_limit?fields=quota_usage,rate_limit_settings&since=1609969714&access_token=IGQVJ...' ``` -------------------------------- ### Sample Response for Get Messages in a Conversation Source: https://developers.facebook.com/docs/instagram-platform/instagram-api-with-instagram-login/conversations-api Example JSON response when successfully retrieving messages from a conversation. Includes message IDs and creation times. ```json { "messages": { "data": [ { "id": "", "created_time": "" }, { "id": "", "created_time": "" }, { "id": "", "created_time": "" }, ... ] }, "id": "", } ``` -------------------------------- ### Example Response for Content Publishing Limit Source: https://developers.facebook.com/docs/instagram-api/reference/ig-user/content_publishing_limit This is an example JSON response showing the current quota usage and configuration for content publishing limits. It includes the number of times published and the total quota with its duration. ```json { "data": [ { "quota_usage": 2, "config": { "quota_total": 50, "quota_duration": 86400 } } ] } ``` -------------------------------- ### Example Response for /me/accounts Source: https://developers.facebook.com/docs/instagram-platform/instagram-api-with-facebook-login/business-login-for-instagram This is an example response from the /me/accounts endpoint, showing Page details including ID, name, access token, and Instagram Business account ID. Token values are truncated. ```json { "data": [ { "id": "134895793791914", "name": "Metricsaurus", "access_token": "EAACw...", "instagram_business_account": { "id": "17841405309211844" } } ], "paging": { "cursors": { "before": "MTc1NTg0Nzc2ODAzNDQwMgZDZD", "after": "MTc1NTg0Nzc2ODAzNDQwMgZDZD" } } } ``` -------------------------------- ### Example Successful Authorization Redirect URI Source: https://developers.facebook.com/docs/instagram-platform/instagram-api-with-instagram-login/business-login This is an example of a redirect URI after a successful authorization. The 'code' parameter contains the authorization code that needs to be captured. ```url https://my.m.redirect.net/?code=**abcdefghijklmnopqrstuvwxyz**#_ ``` -------------------------------- ### Example Facebook Login URL Source: https://developers.facebook.com/docs/instagram-platform/instagram-api-with-facebook-login/business-login-for-instagram An example URL constructed for an app using the Instagram Messaging API, requesting necessary permissions. ```URL https://www.facebook.com/v25.0/dialog/oauth?client_id=442224939723604&display=page&extras={"setup":{"channel":"IG_API_ONBOARDING"}}&redirect_uri=https://my-clever-redirect-url.com/success/&response_type=token&scope=instagram_basic,instagram_content_publish,instagram_manage_comments,instagram_manage_insights,pages_show_list,pages_read_engagement ``` -------------------------------- ### Test Webhook Setup with curl Source: https://developers.facebook.com/docs/instagram-api/guides/webhooks This command demonstrates how to test your webhook setup by sending a request to your Heroku app's callback URL using `curl`. This is useful for verifying that your server endpoint is correctly receiving and responding to webhook events. ```bash curl https://.herokuapp.com/facebook ``` -------------------------------- ### Get All IG Media Request Source: https://developers.facebook.com/docs/instagram-api/reference/ig-user/media Sample GET request to retrieve all IG Media for a given user. Supports time-based pagination using 'since' and 'until' parameters. ```http GET graph.facebook.com/v25.0/17841405822304914/media ``` -------------------------------- ### Get Interaction Metrics Source: https://developers.facebook.com/docs/instagram-api/reference/ig-user/insights Retrieves interaction metrics such as reach for a specified period and breakdown. This example shows how to get the 'reach' metric broken down by 'media_product_type'. ```APIDOC ## GET /insights ### Description Retrieves interaction metrics for an Instagram user account. ### Method GET ### Endpoint `/{ig-user-id}/insights` ### Parameters #### Query Parameters - **metric** (string) - Required - The metric(s) to retrieve (e.g., `reach`, `impressions`). - **period** (string) - Required - The period for the metric (e.g., `day`, `week`, `days_28`, `lifetime`). - **breakdowns** (string) - Optional - Breakdown dimension(s) for the metric (e.g., `media_product_type`, `country`). - **metric_type** (string) - Optional - Specifies the type of metric values to return. Use `total_value` for aggregated results. - **since** (integer) - Optional - A Unix timestamp to retrieve data from. - **access_token** (string) - Required - An OAuth access token for the user. ### Request Example ```bash curl -i -X GET \ "https://graph.facebook.com/v25.0/17841405822304914/insights?metric=reach&period=day&breakdown=media_product_type&metric_type=total_value&since=1658991600&access_token=EAAOc..." ``` ### Response #### Success Response (200) - **data** (Array) - An array of objects describing the requested metrics and their results. - **name** (String) - Metric requested. - **period** (String) - Period requested. - **title** (String) - Metric title. - **description** (String) - Metric description. - **total_value** (Object) - Object describing requested breakdown values (if breakdowns were requested). - **value** (Integer) - Sum of requested metric values. - **breakdowns** (Array) - An array of objects describing each breakdown set. - **dimension_keys** (Array) - An array of strings describing breakdowns requested in the query. - **results** (Array) - An array of objects describing each breakdown set. - **dimension_values** (Array) - An array of strings describing breakdown set values. - **value** (Integer) - Sum of breakdown set values. - **id** (String) - A string describing the query's path parameters. - **paging** (Object) - An object containing URLs used to request the next set of results. - **previous** (String) - URL to retrieve the previous page of results. - **next** (String) - URL to retrieve the next page of results. #### Response Example ```json { "data": [ { "name": "reach", "period": "day", "title": "Accounts reached", "description": "The number of unique accounts that have seen your content, at least once, including in ads. Content includes posts, stories, reels, videos and live videos. Reach is different from impressions, which may include multiple views of your content by the same accounts. This metric is estimated and in development.", "total_value": { "value": 224, "breakdowns": [ { "dimension_keys": [ "media_product_type" ], "results": [ { "dimension_values": [ "CAROUSEL_CONTAINER" ], "value": 100 }, { "dimension_values": [ "POST" ], "value": 124 } ] } ] }, "id": "17841405309211844/insights/reach/day" } ], "paging": { "previous": "https://graph.face...", "next": "https://graph.face..." } } ``` ``` -------------------------------- ### Get Demographic Metrics Source: https://developers.facebook.com/docs/instagram-api/reference/ig-user/insights Retrieves demographic metrics for a specified timeframe and breakdown. This example shows how to get 'engaged_audience_demographics' broken down by 'country' over the last 90 days. ```APIDOC ## GET /insights ### Description Retrieves demographic metrics for an Instagram user account. ### Method GET ### Endpoint `/{ig-user-id}/insights` ### Parameters #### Query Parameters - **metric** (string) - Required - The metric(s) to retrieve (e.g., `engaged_audience_demographics`). - **period** (string) - Required - The period for the metric (e.g., `lifetime`). - **timeframe** (string) - Required - The timeframe for the metric (e.g., `last_90_days`). - **breakdowns** (string) - Optional - Breakdown dimension(s) for the metric (e.g., `country`). - **metric_type** (string) - Optional - Specifies the type of metric values to return. Use `total_value` for aggregated results. - **access_token** (string) - Required - An OAuth access token for the user. ### Request Example ```bash curl -i -X GET \ "https://graph.facebook.com/v25.0/17841405822304914/insights?metric=engaged_audience_demographics&period=lifetime&timeframe=last_90_days&breakdowns=country&metric_type=total_value&access_token=EAAOc..." ``` ### Response #### Success Response (200) - **data** (Array) - An array of objects describing the requested metrics and their results. - **name** (String) - Metric requested. - **period** (String) - Period requested. - **title** (String) - Metric title. - **description** (String) - Metric description. - **id** (String) - A string describing the query's path parameters. - **paging** (Object) - An object containing URLs used to request the next set of results. - **previous** (String) - URL to retrieve the previous page of results. - **next** (String) - URL to retrieve the next page of results. #### Response Example (Response structure will vary based on the specific demographic metric requested. Refer to the general response structure for insights.) ``` -------------------------------- ### cURL Example for Live Media Request Source: https://developers.facebook.com/docs/instagram-api/reference/ig-user/live_media This cURL command demonstrates how to request live media with specific fields and an access token. Replace placeholders with your actual values. ```bash curl -X GET \ 'https://graph.facebook.com/v25.0/17841405822304914/live_media?fields=id,media_type,media_product_type,owner,username,comments&access_token=IGQVJ...' ``` -------------------------------- ### Example Request to Search Products Source: https://developers.facebook.com/docs/instagram-api/guides/product-tagging This cURL command demonstrates how to search for products within a specific catalog, filtering by a search query. Ensure you replace placeholders with your actual IDs and access token. ```curl curl -i -X GET \ "https://graph.facebook.com/v25.0/90010177253934/catalog_product_search?catalog_id=960179311066902&q=gummy&access_token=EAAOc..." ``` -------------------------------- ### Get Comments Response Source: https://developers.facebook.com/docs/instagram-api/reference/ig-media/comments This is an example of the JSON response when retrieving comments on a media object. It includes comment IDs, text, and timestamps. ```JSON { "data": [ { "timestamp": "2017-08-31T19:16:02+0000", "text": "This is awesome!", "id": "17870913679156914" }, { "timestamp": "2017-08-31T18:10:30+0000", "text": "*Sniff*", "id": "17873440459141021" } ] } ``` -------------------------------- ### Sample Request for Reading an IG Hashtag Source: https://developers.facebook.com/docs/instagram-api/reference/ig-hashtag Example of a GET request to retrieve the ID and name fields for a specific Instagram Hashtag. ```bash GET https://graph.facebook.com/17841593698074073 ?fields=id,name &access_token=EAADd... ``` -------------------------------- ### Publish Trial Reels Post Source: https://developers.facebook.com/docs/instagram-api/guides/content-publishing To publish a trial reel, create a container for the video and include the media_type=REELS parameter along with the video_url and trial_params. The graduation_strategy can be MANUAL or SS_PERFORMANCE. ```bash curl -X POST "https://graph.instagram.com/v25.0/90010177253934/media" -H "Content-Type: application/json" -d '{ "media_type":"REELS" "video_url":"https://www.example.com/videos/bronz-fonz.mp4" "trial_params":{ “graduation_strategy”: “MANUAL” } }' ``` -------------------------------- ### Sample Response for Get Page's IG User Source: https://developers.facebook.com/docs/instagram-api/reference/page Example of a successful response when querying for a Page's Instagram Business Account. ```JSON { "instagram_business_account": { "id": "17841405822304914" }, "id": "134895793791914" } ``` -------------------------------- ### Sample Verification Request Source: https://developers.facebook.com/docs/instagram-api/guides/webhooks This is an example of a GET request sent by Facebook/Instagram to verify your webhook endpoint. It includes parameters like hub.mode, hub.challenge, and hub.verify_token. ```http GET https://www.your-clever-domain-name.com/webhooks? hub.mode=subscribe& hub.challenge=1158201444& hub.verify_token=meatyhamhock ``` -------------------------------- ### Sample IG User Media Publish Request Source: https://developers.facebook.com/docs/instagram-api/reference/ig-user/media_publish An example of a POST request to publish an IG Container. Use this as a template for your own requests. ```bash POST graph.facebook.com /17841405822304914/media_publish ?creation_id=17889455560051444 ``` -------------------------------- ### Retrieve an Event Source: https://developers.facebook.com/docs/instagram-platform/instagram-api-with-facebook-login/upcoming-events To retrieve details of an existing event, send a GET request to the / endpoint. This returns the event's ID, title, and start time. ```APIDOC ## GET / ### Description Retrieves details of an existing upcoming event. ### Method GET ### Endpoint `https://graph.facebook.com/v25.0/` ### Parameters #### Path Parameters - **EVENT_ID** (string) - Required. The ID of the event to retrieve. #### Query Parameters - **access_token** (string) - Required. The access token for the user. ### Response #### Success Response (200) - **id** (string) - The event's ID. - **title** (string) - The event's title. - **start_time** (string) - The event's start time. #### Response Example ```json { "id": "", "title":"Updated Season Premier", "start_time":"2024-05-11T16:00:00+0000" } ``` ``` -------------------------------- ### Create Reel Container with Audio and Loop Setting Source: https://developers.facebook.com/docs/instagram-platform/content-publishing/audio-api This sample demonstrates creating a Reel container with audio attached, including specific volume settings for both the audio and video, and disabling audio looping. ```curl curl -X POST "https://graph.facebook.com/v22.0/{ig-user-id}/media" \ -d "media_type=REELS" \ -d "video_url={video-url}" \ -d 'audio_configuration={"audio_id":"{audio-id}","audio_volume":100,"video_volume":60,"should_loop_audio":false}' \ -d "access_token={access-token}" ``` -------------------------------- ### Get Instagram Media Insights with Breakdowns Source: https://developers.facebook.com/docs/instagram-platform/reference/instagram-media/insights This example demonstrates how to retrieve insights for Instagram media, utilizing the `breakdown` parameter to segment data by `action_type` for the `profile_activity` metric. ```APIDOC ## GET /insights ### Description Retrieves insights for a specific Instagram media object. Supports segmentation of metrics using the `breakdown` parameter. ### Method GET ### Endpoint `/{media-id}/insights` ### Parameters #### Query Parameters - **metric** (string) - Required - The metric(s) to retrieve insights for (e.g., `profile_activity`, `navigation`). - **breakdown** (string) - Optional - Specifies how to break down the metric data. Compatible values depend on the metric requested (e.g., `action_type` for `profile_activity`, `story_navigation_action_type` for `navigation`). - **access_token** (string) - Required - An authentication token for the API request. ### Request Example ```json curl -i -X GET \ "https://graph.facebook.com/v25.0/17932174733377207/insights?metric=profile_activity&breakdown=action_type&access_token=EAAOc..." ``` ### Response #### Success Response (200) - **data** (Array) - An array containing insight objects. - **name** (String) - The name of the metric. - **period** (String) - The period for the insights (always `lifetime`). - **values** (Array) - An array of objects, each containing a `value` for the metric. - **title** (String) - The title of the metric. - **description** (String) - The description of the metric. - **total_value** (Object) - Contains the total value and breakdown results if breakdowns were requested. - **value** (Integer) - The sum of requested breakdown values. - **breakdowns** (Array) - An array of objects detailing the breakdown results. - **dimension_keys** (Array) - Array of strings describing the requested breakdowns. - **results** (Array) - Array of objects detailing each breakdown set. - **dimension_values** (Array) - Array of strings describing the values for each breakdown set. - **value** (Integer) - The sum of values for this specific breakdown set. - **id** (String) - A string describing the query's path parameters. - **paging** (Object) - Contains URLs for paginating through results. - **previous** (String) - URL to retrieve the previous page of results. - **next** (String) - URL to retrieve the next page of results. #### Response Example ```json { "data": [ { "name": "profile_activity", "period": "lifetime", "values": [ { "value": 150 } ], "title": "Profile Activity", "description": "Profile Activity", "total_value": { "value": 150, "breakdowns": [ { "dimension_keys": [ "action_type" ], "results": [ { "dimension_values": [ "BIO_LINK_CLICKED" ], "value": 50 }, { "dimension_values": [ "CALL" ], "value": 30 }, { "dimension_values": [ "DIRECTION" ], "value": 20 }, { "dimension_values": [ "EMAIL" ], "value": 10 }, { "dimension_values": [ "OTHER" ], "value": 20 }, { "dimension_values": [ "TEXT" ], "value": 20 } ] } ] }, "id": "17932174733377207" } ] } ``` ``` -------------------------------- ### Publish Post with Partnership Ads Label Source: https://developers.facebook.com/docs/instagram-api/guides/content-publishing Create a media container and include branded_content_sponsor_ids and/or is_paid_partnership parameters to add a partnership ads label. Ensure your access token has the necessary permissions. ```bash curl -X POST "https://graph.facebook.com///media" \ -H "Authorization: Bearer " \ -d "image_url=" \ -d "caption=" \ -d "branded_content_sponsor_ids=[, ]" \ -d "is_paid_partnership=true" ``` -------------------------------- ### cURL Example for Reading IG Comment Source: https://developers.facebook.com/docs/instagram-api/reference/ig-comment This cURL command demonstrates how to make a GET request to retrieve specific fields of an IG Comment. Replace placeholders with your actual values. ```bash curl -i -X GET \ "https://graph.instagram.com/v25.0/17881770991003328?fields=hidden%2Cmedia%2Ctimestamp&access_token=EAAOc..." ``` -------------------------------- ### Create a Media Container Source: https://developers.facebook.com/docs/instagram-platform/content-publishing Use this snippet to create a container for a single image or video. Ensure the image/video URL is publicly accessible. ```bash curl -X POST "https://///media" -H "Content-Type: application/json" -H "Authorization: Bearer " -d '{ "image_url":"https://www.example.com/images/bronz-fonz.jpg" }' ``` -------------------------------- ### Get Instagram Account Insights Source: https://developers.facebook.com/docs/instagram-api/guides/insights Retrieve impressions, profile views, and reach for an Instagram professional account over a 24-hour period. This example uses the Instagram API with Facebook Login. ```HTTP GET graph.facebook.com/17841405822304914/insights ?metric=impressions,reach,profile_views &period=day ``` -------------------------------- ### Create a Media Container Source: https://developers.facebook.com/docs/instagram-api/guides/content-publishing Send a POST request to the //media endpoint to create a container for an image or video. Ensure the image_url or video_url points to a publicly accessible resource. ```bash curl -X POST "https://///media" -H "Content-Type: application/json" -H "Authorization: Bearer " -d '{ "image_url":"https://www.example.com/images/bronz-fonz.jpg" }' ``` -------------------------------- ### Create a Media Container with Product Tags Source: https://developers.facebook.com/docs/instagram-api/guides/product-tagging Use the IG User Media endpoint to create a container for an image or video, including product tags. This is the first step before publishing media with product tags. ```http POST /{ig-user-id}/media ``` -------------------------------- ### Get Instagram User Demographic Insights Source: https://developers.facebook.com/docs/instagram-api/reference/ig-user/insights This example shows how to retrieve demographic insights for engaged audiences, broken down by country, over the last 90 days. Ensure you have the necessary permissions and an access token. ```curl curl -i -X GET \ "https://graph.facebook.com/v25.0/17841405822304914/insights?metric=engaged_audience_demographics&period=lifetime&timeframe=last_90_days&breakdowns=country&metric_type=total_value&access_token=EAAOc..." ``` -------------------------------- ### Get Media Insights with Breakdowns Source: https://developers.facebook.com/docs/instagram-api/reference/ig-media/insights This example demonstrates how to retrieve profile activity insights for a specific media ID, broken down by action type. It also shows the structure of the response, including the `total_value` and `breakdowns` fields. ```APIDOC ## GET /:media-id/insights ### Description Retrieves insights for a specific Instagram media object. Supports breakdowns for certain metrics to provide more granular data. ### Method GET ### Endpoint `https://graph.facebook.com/v25.0/:media-id/insights` ### Parameters #### Query Parameters - **metric** (string) - Required - The metric(s) to retrieve insights for (e.g., `profile_activity`, `navigation`). - **breakdown** (string) - Optional - Specifies how to break down the metric data. Compatible values depend on the metric. For `profile_activity`, use `action_type`. For `navigation`, use `story_navigation_action_type`. - **access_token** (string) - Required - An OAuth access token for the user. ### Request Example ```json { "example": "curl -i -X GET \n \"https://graph.facebook.com/v25.0/17932174733377207/insights?metric=profile_activity&breakdown=action_type&access_token=EAAOc...\"" } ``` ### Response #### Success Response (200) An object containing the requested insights data. The structure includes `data`, `name`, `period`, `values`, `title`, `description`, `id`, and optionally `total_value` with `breakdowns` if requested. ```json { "data": [ { "name": "profile_activity", "period": "lifetime", "values": [ { "value": 150 } ], "title": "Profile Activity", "description": "Profile activity insights", "id": "17932174733377207", "total_value": { "value": 150, "breakdowns": [ { "dimension_keys": [ "action_type" ], "results": [ { "dimension_values": [ "BIO_LINK_CLICKED" ], "value": 50 }, { "dimension_values": [ "CALL" ], "value": 30 } ] } ] } } ] } ``` ``` -------------------------------- ### Create Media Container Source: https://developers.facebook.com/docs/instagram-platform/instagram-api-with-instagram-login/content-publishing Use this endpoint to create a media container for uploading media. For large videos in unstable network conditions, use `upload_type=resumable`. ```bash curl -X POST \ -F 'image_url="https://your.server.com/image.jpg"' \ -F 'caption="My awesome picture! #awesome"' \ -F 'access_token="YOUR_ACCESS_TOKEN"' \ "https://graph.instagram.com/INSTAGRAM_BUSINESS_ACCOUNT_ID/media" ``` -------------------------------- ### Get Instagram User Reach Insights with Media Product Type Breakdown Source: https://developers.facebook.com/docs/instagram-api/reference/ig-user/insights This example demonstrates how to fetch daily reach insights for a user, broken down by media product type (e.g., carousel, post). It requires specifying the metric, period, breakdown, metric type, and a time range. ```curl curl -i -X GET \ "https://graph.facebook.com/v25.0/17841405822304914/insights?metric=reach&period=day&breakdown=media_product_type&metric_type=total_value&since=1658991600&access_token=EAAOc..." ``` ```json { "data": [ { "name": "reach", "period": "day", "title": "Accounts reached", "description": "The number of unique accounts that have seen your content, at least once, including in ads. Content includes posts, stories, reels, videos and live videos. Reach is different from impressions, which may include multiple views of your content by the same accounts. This metric is estimated and in development.", "total_value": { "value": 224, "breakdowns": [ { "dimension_keys": [ "media_product_type" ], "results": [ { "dimension_values": [ "CAROUSEL_CONTAINER" ], "value": 100 }, { "dimension_values": [ "POST" ], "value": 124 } ] } ] }, "id": "17841405309211844/insights/reach/day" } ], "paging": { "previous": "https://graph.face...", "next": "https://graph.face..." } } ``` -------------------------------- ### Get Basic Metrics on Media Objects Source: https://developers.facebook.com/docs/instagram-api/guides/business-discovery This example demonstrates how to retrieve public fields such as comment count, like count, and view count for media objects published by an Instagram professional account using nested requests and field expansion. Note that view count includes both paid and organic metrics. ```http GET graph.facebook.com /17841405309211844 ?fields=business_discovery.username(bluebottle){media{comments_count,like_count,view_count}} ``` -------------------------------- ### Example Response for Comments Source: https://developers.facebook.com/docs/instagram/ads-api/guides/post-moderation This is an example of the JSON response structure when retrieving comments for an Instagram post. ```json { "data": [ { "id": "1234", "text": "Where can I get it?" } { "id": "5678", "text": "This is nice.", } ], "paging": { ... } } ``` -------------------------------- ### Sample Audio Search Response Source: https://developers.facebook.com/docs/instagram-platform/content-publishing/audio-api This is an example of the JSON response when searching for audio assets. It includes details like audio ID, title, duration, and download URL. ```JSON { "audio": [ { "audio_id": "587784541076604", "cover_artwork_thumbnail_uri": "https://scontent-...", "display_artist": "Shuba", "duration_in_ms": 153760, "audio_type": "music", "title": "Birthday Wish", "download_url": "https://scontent-lga3..." } ] } ``` -------------------------------- ### Create Tagged Media Container (Image) Source: https://developers.facebook.com/docs/instagram-api/guides/product-tagging Use this endpoint to create a media container with product tags for an image. Ensure the product_tags parameter is correctly formatted as a JSON array. ```curl curl -i -X POST \n "https://graph.facebook.com/v25.0/90010177253934/media?image_url=https%3A%2F%2Fupl...&location_id=7640348500&product_tags=%5B%0A%20%20%7B%0A%20%20%20%20product_id%3A'3231775643511089'%2C%0A%20%20%20%20x%3A%200.5%2C%0A%20%20%20%20y%3A%200.8%0A%20%20%7D%0A%5D&access_token=EAAOc..." ``` ```http https://graph.facebook.com/v12.0/90010177253934/media?image_url=https://upl...&location_id=7640348500 &product_tags=[ { product_id:'3231775643511089', x: 0.5, y: 0.8 } ]&access_token=EAAOc... ``` -------------------------------- ### Create Tagged Media Container (Reels) Source: https://developers.facebook.com/docs/instagram-api/guides/product-tagging Use this endpoint to create a media container for Reels with product tags. The media_type must be set to REELS, and the video_url must point to a public server. ```curl curl -i -X POST \n "https://graph.facebook.com/v25.0/90010177253934/media?media_type=REELS&video_url=https://upl...&product_tags=%5B%0A%20%20%7B%0A%20%20%20%20product_id%3A'3231775643511089'%0A%20%20%7D%0A%5D&access_token=EAAOc..." ``` ```http https://graph.facebook.com/v12.0/90010177253934/media?media_type=REELS&video_url=https://upl... &product_tags=[ { product_id:'3231775643511089' } ]&access_token=EAAOc... ``` -------------------------------- ### Instagram Business Account Response Example Source: https://developers.facebook.com/docs/instagram-platform/instagram-api-with-facebook-login/get-started Example response for the /{page-id}?fields=instagram_business_account endpoint, providing the connected IG User ID. ```json { "instagram_business_account": { "id": "17841405822304914" // Connected IG User ID }, "id": "134895793791914" // Facebook Page ID } ``` -------------------------------- ### Create Ad Source: https://developers.facebook.com/docs/instagram/marketing-api/guides/reminder-ads Use this `curl` command to create an ad. You must provide the ad set ID, the creative ID, and optionally set the status to `PAUSED` for review. Replace placeholders with your specific values. ```curl curl -X POST "https://graph.facebook.com/v25.0/act_/ads" \ -F 'name=Reminder Ad' \ -F 'adset_id= \ -F 'creative={ "creative_id": "" }' \ -F 'status=PAUSED \ -F 'access_token=' ``` -------------------------------- ### Get Appeal Status Source: https://developers.facebook.com/docs/instagram-platform/instagram-api-with-facebook-login/product-tagging Use the IG User Product Appeal endpoint to get the status of an appeal for a given rejected product. ```APIDOC ## GET /{ig-user-id}/product_appeal ### Description Use the IG User Product Appeal endpoint to get the status of an appeal for a given rejected product. ### Method GET ### Endpoint /{ig-user-id}/product_appeal ### Parameters #### Query Parameters - **product_id** (string) - Required - Product ID. ### Response #### Success Response (200) - **data** (array) - Appeal status metadata. Responses can include the following appeal fields: - **product_id** (string) - Product ID. - **review_status** (string) - Review status. Value can be: `approved`, `rejected`, `pending`, `outdated`, `""` (no review status), or `no_review`. - **eligible_for_appeal** (boolean) - Indicates if decision can be appealed (yes if `true`, no if `false`). ``` -------------------------------- ### Publish Reel with Audio Configuration Source: https://developers.facebook.com/docs/instagram-platform/content-publishing/audio-api Use this sample request to publish a Reel with a specific audio asset attached. You can control the volume of both the audio asset and the video's original audio, and specify if the audio should loop. ```curl curl -X POST "https://graph.facebook.com/v22.0/{ig-user-id}/media" \ -d "media_type=REELS" \ -d "video_url={video-url}" \ -d 'audio_configuration={"audio_id":"587784541076604","audio_volume":80,"video_volume":50}' \ -d "access_token={access-token}" ``` -------------------------------- ### Discover Creators in Marketplace Source: https://developers.facebook.com/docs/instagram-platform/instagram-api-with-facebook-login/creator-marketplace Use this endpoint to find creators based on specified criteria like country. Ensure you have the necessary permissions and provide a valid access token. ```bash curl -G \ -d 'creator_countries=["US"]' \ -d 'fields=id,username,country,gender' \ -d 'access_token=' \ 'https://graph.facebook.com/v25.0//creator_marketplace_creators' ``` -------------------------------- ### Example Instagram Login Redirect Source: https://developers.facebook.com/docs/instagram-platform/instagram-api-with-facebook-login/business-login-for-instagram An example of a redirect URL after a user interacts with the Instagram login flow. Token values are truncated for brevity. ```URL https://my-clever-redirect-url.com/success/?#access_token=EAAHm...&data_access_expiration_time=1658889585&expires_in=4815&long_lived_token=ABAEs... ```