


#Instafeed tutorial code#
This access token is then used to make the API request but that token will eventually expire and a new one will then be needed.Įxactly how OAuth works is a topic for a separate article but what is important to know now, is that we will need some piece of server code that will periodically contact Instagram to refresh the token. The Basic Display API replaces this with OAuth where a physical user now needs to log in and approve an application, to then get an access token. The old one used an API key that was sent with each request to provide it info who accessed it. The old Instagram API no longer works and it is now replaced with the Basic Display API where the biggest difference is the authentication process used to access the API. Well, as it turns out, it won’t be as easy as just switching to another script. OK, fair enough, I’m sure that Instafeed is on top of this and that they have an updated version that I can just replace and it will all work again in 5 minutes. OK, so the conclusion is that Instagram changed something. If for some reason you don’t know what an API key is, Tom Scott has an excellent video on the topic. To be able to access my feed, I have provided an API key to the script, and from what I could see this should have still been working. Looking through the code of my site, I found the part where I first load Instafeed, and then I located the other script where I actually initialize it to load 12 of the latest images from Instagram and show them based on the specified template. Now what?īased on that message I noticed that the error comes for a file called instafeed.js and I remembered that I’ve used that library when I was building the site. Well, congratulations on your retirement. I quickly opened up the developer tools on the browser by pressing F12 on the keyboard and I was very happily greeted with a message that said “This endpoint has been retired”.
