Get popular photos from Instagram

We'll show you how to make a Choreo that retrieves information about current popular photos on Instagram. We'll cover topics like registering an application with Instagram, obtaining an OAuth Client ID, and making a HTTP Request to the Instagram API. This particular interaction follows a pattern that you'll see over and over when working with most modern APIs.

Get Set Up

1Make sure you have a Temboo account. If you don't already have one, you can register for a free account here.

2Download and install Twyla for Mac or Windows. For information about how to obtain the Twyla installer, please contact

3Next, you'll need to register a new Instagram API application on their developer website.

4Fill in the details on the new OAuth Client form as shown in the screenshot below:

Registering a new application with the Instagram API

5Once you've registered your application, take note of your Client ID, you'll need that later. For the most part, Instagram API calls only require a Client ID for authentication. When an API call accesses a protected resource on behalf of another user, you'll also need to obtain an OAuth Access Token which you can retrieve using our Instagram OAuth Helper Choreos.

The new app details screen containing your Instagram Client ID

Make a HTTP request to Instagram

Now that you've got your Instagram OAuth Client ID, you're ready to start building an Instagram API request in Twyla. All Instagram API calls are documented on the Instagram developer site and we're going to build a Choreo for the media/popular endpoint, which they describe here.

6First, drag a HTTP Request Step from the Steps Palette to the canvas. Connect the Begin Step to your new HTTP Request Step.

Making a connection between the Begin step and the HTTP Request step

7Double click the HTTP Request Step to open the step property editor. On the Server tab, configure the URL field with the appropriate Instagram endpoint as shown in the screenshot below. For this example, we'll use this endpoint:

Configuring the HTTP Request step Server tab with Instagram endpoint details

8On the Request tab, specify a client_id HTTP parameter. You can create a new local variable if you want to pass this in dynamically, which is what we've done in the screenshot below. Otherwise, just hard-code in the value you got from Instagram earlier.

Configuring the Request tab with a Client ID value

9Create a new Output variable called Response. Make sure that you set its type to 'File'.

An output variable of type File called Response

10Back in the HTTP Request Step, go to the Response tab and specify your new output variable in the 'Store Retrieved Data In' field.

Configuring the Response tab in the HTTP Request step

11That's it–the Choreo is now complete. You can switch to Test Mode to try it out. If you select the Response variable from the Choreo outputs you'll see details about who and what is currently popular on Instagram.

Configuring the Response tab in the HTTP Request step

Need Help?

We're always happy to help. Just email us at, and we'll answer your questions.