Get Instagram access token without login screen

jack5891 picture jack5891 · Jan 5, 2016 · Viewed 11.9k times · Source

I'm working with the new Instagram api in my website. The code-behind is c#. I need to retrieve photos with a given hashtag and then to show that photos in my web pages.

Is it possible to do that without show a login screen for every user that visit my web app to get the access token?

I can see every tag that I want in public instagram pages without autenticate myself (Es: https://www.instagram.com/explore/tags/ciao/).

If the answer is negative can i authenticate myself via api and avoid the login screen?

Thanks in advance and sorry for my english.

Answer

Aaron Brager picture Aaron Brager · Jan 5, 2016

From the Instagram API docs:

You can retrieve photos with a given hashtag by accessing the following URL with your access_token (replace ACCESS-TOKEN with your own):

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.

This access_token does not need to be your user's token. It could be your token instead. But it has to be somebody's.

Just make sure to review the rate limit documentation also. Rate limits are separate for each access token, so you may need to generate a number of access tokens and round-robin them. You could also allow your users to login if they want, and use their access token if they're logged in.