Running a GET Request to get instagram analytics data

Hey everyone,

I’m in the process of setting up a workflow to retrieve Instagram analytics via an HTTP GET request. While I’m aware of the existing module for Instagram analytics, it only fetches basic metrics like reach and impressions. I’m looking to customise this and pull a broader range of data.

So far, I’ve created a Meta App and connected it to the Instagram API. I’ve also looked through the Facebook developer documentation for GET requests (you can check it out here). However, it’s been a bit confusing since the examples focus on using the Graph API Explorer, which isn’t exactly helpful for my use case.

Here’s the type of GET request I’m trying to make:

GET https://graph.facebook.com/{api-version}/{ig-user-id}/insights
  ?metric=<COMMA_SEPARATED_LIST_OF_METRICS>
  &period=<PERIOD>
  &timeframe={timeframe}
  &metric_type={metric-type}
  &breakdown={breakdown}
  &since=<START_TIME>
  &until=<STOP_TIME>
  &access_token=<INSTAGRAM_USER_ACCESS_TOKEN>

I already have the access token from setting up the app, but I’m stuck on two things:

  1. How do I properly structure this GET request to fetch the data I need?
  2. How do I retrieve the Instagram user ID (ig-user-id) to include in the request?
  3. How do i put this all into a HTTPs module? What headers do i need? What Query Parameters do I include?

Any help would be greatly appreciated! Thanks in advance!

Hello,

one way is to get inspiration from what the Make module does. To do this, you can install and use the Make Dev Tool (https://chromewebstore.google.com/detail/make-devtool/ainnemkhpnjgkhcdkfbhmlenkhehmfhi?utm_source=ext_app_menu)

Once it’s installed, you access it via “More Tools / Development tools”. There, you will have a tab “Make”.

When the “Live Stream” is displayed, you can run once the Instagram module. You will see how the call was done; it should help you build your own. You will see your id as well.


This screenshot shows the “Debugger” that we use to see previous runs, but you will get equivalent with the Live Stream and a live execution of the module.

I hope it will help.

Benjamin