Instagram authentication using PHP

Some time we need to get user instagram details like username ,follows, followers and media.

For this first you need authenticate your app and then get accesstoken and after that you will use that accesstoken to get userinfo.

It is very easy and simple to authenticate instagram user account using curl request.

Step 1: Create an app and get your client and secret key.

You need to create an app here: https://www.instagram.com/developer/

Step 2:Authenticate your app and get accesstoken

Here is authentication url :

Now get accesstoken:

Note: Redirect uri must match with redirect uri while creating your app.

redirect.php

Now get userinfo:

Cheers!! 🙂

Gaurav Kumar

Hi, my name is Gaurav Kumar and I specialize in Computer Software industry. I have been working as a Software Developer from last 3+ years,and its my passion to learn new technology and sharing what I've learned.