Back to Top

Introduction to the Instagram API

instagram-api

Instagram is one of the most popular platforms, which specializes in the exchange of photos and videos. To help customers integrate social network deeper into daily life, he released an open application programming interface (API).

For those who have never heard the term before API, API is a “seamless” interface between two different software. Instagram API is the most useful API for the developers.

What is Instagram?

Instagram is the platform which is popular now due to its simple and user-friendly structure for exchanging the photos and videos.Instagram is a mobile app which allows users to share photos and videos using a variety of filter effects to enhance photos. Also, You can share to the other social networks like Facebook, Twitter, and Tumblr.

What is Instagram API

Instagram provides rich API for the developers which allows access to any information generated by users. Unfortunately, Instagram API only provides a way to read, there is no way to upload images to bypass the official Android or IOS application.

In spite of the read-only API Status, you can make a really useful and interesting application using Instagram API. For example, you can get a list of pictures, pictures by specific geographical location, a list of popular pictures, other information like a comment, likes etc by a picture.

Instagram comes with developers rich API which allows a developer to access any user-generated information.This API mainly helps a user to integrate social network deeper on their website. Unfortunately, API can only read information from Instagram so You can not upload images using the API but you can make a really useful application using this read-only API.

Instagram API works on the REST API model and uses the OAuth 2.0 protocol so that it can be accessed using any language which understands JSON.

Creating the application

To access the API, should first create an application on the developer page, specify the name and web-address of the application and get the CLIENT ID.

Most requests require only an indication of the CLIENT ID. Client_id simply connects your server, a script or a program with a particular application. However, some requests require authentication – user authentication in your application and the subsequent receipt of access_token for making the request.

Instagram API for developers can obtain information using API are listed here:

Users – User Info, User Feed
Relationships – relationships between users

Getting tape media for user id for the search query, for geotagging

comments – Receiving / sending / deleting comments

Likes -Getting, sending, deleting likes

Tags Search – Search for photos and videos by tags.
Location – Search for images by geolocation (specified location coordinates and the radius of the search)
Geography – Search for images by id location

This article explains to you how you can create an Instagram developer API, create an authentication process with the Instagram API.

Steps to register your Instagram application

Step 1: Register your Application

Login to Instagram Account and Go to this page Instagram Developer Documentation and after that open the page clicking on “Register your Application”.

Register Instagram Application

Next click on the “Register a New Client” button located in the upper right corner. If you are doing it the first time, you will get the below form in which you need to enter website URL, your phone number and the application that you intend to develop with the Application Programming Interface (API).Next, you will get the “Register a New Client” button.

manage instagram clients

Step 2: Developer Sign Up

Once you click on “Register a New Client” button, you will get below screen. Fill up the form providing your Application Name, Description, Company Name, Website URL, Valid redirect URIs, Privacy Policy URL, Contact email, Captcha code and submit the application.

register instagram client

Step 3: Manage Clients

After submission, you will get “Manage” button in a listing of application, where you can see Client Id, Client Secret and status of an application. To Integrate Instagram app in SeenCmp, You need 2 things
1. Client id
2. Client secret

Newly created apps status is Sandbox Mode where have access only to 20 latest media of an access token owner. To avoid these restrictions you should send your app to approval from Instagram Team.

All apps created after 17 November 2015 are in the sandbox. All apps created before 17 November 2015 are live until 1 June 2016, and after they fall into http://sandbox.To get out of the sandbox and get live, an app must go through an Instagram submission process.

Step 4: Instagram submission for Permission

For Instagram submission and approval, select the permissions tab and click on “Start a submission” button.

instagram submission

Next, select the use case applicable to your app category

instagram permission review

Here, You have to select the use case according to your application, following details will appear to enter:

API Use case : You need to explain how your application uses the Instagram API and how your application works under the Instagram approved use cases and who will use your application

Video ScreenCast URL: In this, submit the Video URL in which show the Instagram Login experience and how your application uses the Instagram API and the functionalities of the application.

Additional permission : If your application needs any other permission other than BASIC, select the permission from the drop down and submit the application for the review.

Once You have applied successfully, go to the Permission tab to check the requested status of permission for your application.

Once it’s approved. You are all set to use the LIVE version of API.

Steps to Authorize client to your Instagram APP

The Instagram authentication process involves few steps, Let’s understand how you authenticate your Instagram account:

1. First of all, User will redirect to the Instagram Website to allow access to your application.In this, the user will get a window in the browser where the user needs to give permission to your application.

2. After a user allows the access, get back to redirect URL with the Instagram code.

3. Returned code will be used to send a cURL request to Instagram to fetch the access token.

To Request access_token

After authentication, You can start with cURL request to Instagram to get the user info and access_token. Also, You can save the access_token to a database for later use.

Let’s understand how you can get access_token from Instagram:

First of all, You need to send a POST request to the endpoint https://api.instagram.com/oauth/access_token with the following parameters:

Client ID – App client id, you get after you registering your application
Client Secret – App client secret, you received after registering your application
Grant Type – Currently the only authorization_code is supported
Code – The code that you received in the previous step – $_GET[‘code’]

After successful cURL request, you will get the response.

That’s it. You can use your application now and fetch any provided information to your website.

Share:
Share on Facebook0

Share on LinkedIn1Tweet about this on TwitterShare on Google+1Buffer this pageDigg thisShare on Reddit0

Leave a Reply

Your email address will not be published. Required fields are marked *

Most Popular Posts

How to use Micro Data in HTML5

Posted on 1 year ago

Bhumi

Newly Approved Joomla Module

Posted on 3 years ago

Bhumi

How to create MySQL User Defined Functions

Posted on 5 years ago

Bhumi

The Readers’ Poll – September 2012

Posted on 4 years ago

Bhumi

Introduction to the Instagram API

Updated 4 weeks ago

Bhumi

How to Use the HTML5 Full-Screen API

Updated 1 month ago

Bhumi

What are Lambdas and Closures in PHP?

Updated 1 month ago

Bhumi

MySQL REGEXP Operator

Updated 1 month ago

Bhumi

The Reader’s Poll – June 2015

Posted on 2 years ago

Bhumi

The Reader’s Poll – August 2014

Posted on 2 years ago

Bhumi

The Reader’s Poll – June 2014

Posted on 3 years ago

Bhumi

The Readers’ Poll – May 2014

Posted on 3 years ago

Bhumi

The Readers’ Poll – August 2013

Posted on 3 years ago

Bhumi