Instagram basic display API Guide Part 2 (PHP)

This is Part 2 of how to get a simple Instagram feed for your website using the new Instagram Basic Display API and their tool User Token Generator. Please see Part 1 here, it is essential for this guide.


  • Internet
  • Facebook account (username/password)
  • Instagram account (username/password)
  • Basic to Intermediate PHP knowledge
  • Basic to Intermediate HTML knowledge
  • Basic to Intermediate API handling knowledge

Step 1

In Instagram basic display API Guide Part 1, we generated a Longed lived token, useful to get the desired Instagram feed for our website.

The following information is also available for you here. We are just going to translate it into PHP and make it easier for you :)

First of all, we need to get data from the API:

GET ""


  • id
  • permalink
  • caption
  • media_url
  • media_type
  • access_token: Here, you need to enter the longed lived token we generated in Part 1.

The PHP code below:

Github Code

The only value you will need to replace is $InstaAccessToken for the longed lived token we got from the Generator in Part 1

It is now a matter to send this data to the front end (HTML) and display it there.

I hope you found this guide useful, if you have any questions, contact us.