Search code examples
embedinstagraminstagram-api

Embed multiple instagram images without access_token


The instagram docs say:

https://api.instagram.com/v1/tags/nofilter/media/recent?access_token=ACCESS_TOKEN

The Instagram API requires an access_token from authenticated users for each endpoint. We no longer support making requests using just the client_id.

But to get an access_token, users of my website must click through and authenticate, right?

How can I display a few pictures of a specific instagram-tag on my public website, without requiring users to sign in via their instagram-account?

(There seem to be other pages doing it somehow, is there an iframe embed that displays multiple images? I've only found one where you can display one specific image...)

Update: This WordPress plugin seems to do it with having the admin (i.e. me) generate the access_token once and then having the page use it for all users. Any drawbacks to that approach?


Solution

  • if that access_token expires for some reason or instagram invalidates it, then it will stop working, you should not assume access_token is valid forever.

    Usually it does not expire that often, so if you monitor your widget constantly and update access_token if it has stopped working, then you should be good.