How to display Instagram uploaded images on website

Steps : How to display Instagram uploaded images on website :


Many websites may require to display Images uploaded on Instagram directly on their website. Instagram provides an API that can be utilized & person doesn't have to upload the images in websites also to be listed them automatically on their website.


  1.  An Instagram account is required for login.


  • If you have an account then login to your Instagram account with your Email Id or Mobile Number and Password,

  • Alternatively you can login using facebook account too. 

  • Otherwise, You have to create an account on Instagram and log in with that account on an Instagram website.


  1. If you are the new user, then you have to Upload Images to your Instagram account.


  1. Generate Access Token Key with the following link for your Instagram account.


  1. You have to click on the button that is displayed on the website for generating Access Token Key. – Generate Access Token.


  1. You are not logged in currently, then log in with your Instagram email id and password.


  1. After generating Access Token Key, integrate this Access Token key with API for fetching images from your Instagram Account.


  1. Format of the Generated Token:



  1. API for fetching Images via Access Token Key. We are using Curl Session for integrating API.


$accessToken = "544758xxxx.xxxxed0.fb27d9db186f47168eed3b9534de5f78";


function fetchData($url)


$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $url);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

curl_setopt($ch, CURLOPT_TIMEOUT, 20);

$result = curl_exec($ch);


return $result;



$result = fetchData(" access_token=".$accessToken);


$result = json_decode($result);


  1. Access $result array value on the view page where you want to display all the Instagram images on the website.




Harshita Maheshwari - Jr. Software Engineer













A greatt article.
pavni jaiswal
Please share your views with us
Check if you want to display your email-id.
Enter the sum of digits
5+7 =