Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get Instagram access token without login screen

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.

like image 729
jack5891 Avatar asked Jan 05 '16 16:01

jack5891


1 Answers

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.

like image 190
Aaron Brager Avatar answered Nov 04 '22 17:11

Aaron Brager



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!