Using the Instagram API - instagram

I'm building a site which wants to display recent Instagram images in a carousel, grabbed from a specific geotagged location. I have everything ready to go, but I just can't figure out how to get the data.
I'm using node.js and I want to grab the image URLs server-side and give them to the client for them to make the requests to Instagram to fetch the images. If this hits rate limits or violates Instagram policy then I'll simply cache the images server-side instead. Either way, I have no idea how to get the data I need from Instagram.
The furthest I've got is manually getting an access token using this URL: https://www.instagram.com/oauth/authorize/?client_id=123456&redirect_uri=http://localhost&response_type=token&scope=public_content
Then using that access token I tried the following request in Postman:
https://api.instagram.com/v1/locations/226170293/media/recent?access_token=123456
But it returns the following:
{"pagination": {}, "data": [], "meta": {"code": 200}}
After Googling around a bit, I figured maybe it's because my Instagram app is in sandbox mode. So I went about applying for full access. The request form presents these options:
Which use case best describes your Instagram integration?
I want to install a third party widget to show Instagram content on my website.
I want to display hashtag content and public content on my website.
I want to display my Instagram posts on my website.
I want to build analytics for my own Instagram account.
My app is still in development and/or is a test app.
My app allows non-business users to login and post comments, likes or follow actions.
My app allows people to login with Instagram and share their own content.
My product helps brands and advertisers understand, manage their audience and media rights.
My product helps broadcasters and publishers discover content, get digital rights to media, and share media with proper attribution.
Other
My requirement falls under the second option, but after selecting it, I'm told:
This use case is not supported. We do not approve the public_content permission for one-off projects such as displaying hashtag based content on your website. As alternative solution, you can show your own Instagram content, or find a company that offers this type of service (content discover, moderation, and display).
And actually, selecting any option apart from the 3 options above "Other" presents a message stating it's not allowed. Even selecting "Other" shows:
We do not accept submissions for integrations that do not fall into one of the approved use cases.
Talk about terrible UX.
I'm seriously considering just scraping the URLs instead, but I'm betting that's definitely against Instagram policy, but what other choice do I have? All I want to do is display some images on a website...

Think I have it thanks to https://stackoverflow.com/a/40527149/1864403.
https://www.instagram.com/explore/locations/226170293/?__a=1
No idea how people can find this out other than word-of-mouth.

Related

How to access Instagram Basic Display API without user login?

I am developing a website which would facilitate an end user to see an Instagram user's media such as Profile Pictures, Posts and Stories with the Instagram Basic Display API.
As per the documentation of the API, an Authorization Window needs to be implemented to get Authorization Codes and permissions from app users. Authorization Codes need to be exchanged for Instagram User Access Tokens, which must be included when querying an app user's profile or their media.
Bu there are numerous services which are able to show an Instagram user's media without having to implement the complex pipeline above:
InstaDP
FullInstaDP
InstaFinsta
IZoomYou
InstaDownloader
So, how are these services even able to bypass the Authorization Window and provide a seamless user experience without the end user's login? Especially how is InstaDP able to display reels and InstaDP which are not even support yet in the API?
It's way more sophisticated & costly than official Basic Display API. They are using Instagram private APIs. They use multiple accounts (by its cookies) to fetch those data from Instagram, e.g. for fetching user info, they call endpoints like https://www.instagram.com/washingtonpost/?__a=1. You can open your browser's developer tools to see the endpoints Instagram calls to fetch the details.
By sophistication, I meant
The services that you have mentioned need to emulate human behavior while scraping data from Instagram otherwise Instagram would block those "fake accounts" and it's extremely hard to create accounts in Instagram via automation, you cannot create bulk accounts.
They use residential proxies, and they pay for it.
If you do not want to go all those hassles, you can buy Instagram private APIs but it's not cheap.
Here are some open source projects that might interest you
https://github.com/dilame/instagram-private-api
https://github.com/jlobos/instagram-web-api
https://github.com/ping/instagram_private_api

Can we use Instagram API for Local Development

I am learning React Native by creating a clone of Instagram (Strictly Local Development). I want to use the Instagram API to get some real time data for my app. I tried registering as Instagram Developer but its asking me for the website and policy page of the website, which I don't have. Is it possible to use Instagram API for learning purpose, if so can you give me the steps for ding it??
Yes, you can. I think you're already in the right way. All you need to do is just integrate things up and follow all the steps in the Instagram Developer website.
You are not required to have policy page or anything to use the sandbox, but you will need it later on if you want to use the API in the production state of your app.
You will need to create an app in the developer site, and generate your access token. Then, add a sandbox user (your Instagram account) and start to use the User Endpoint to retrieve your user data (such as your bio, follower count, etc.) and media (this is what you want, your Instagram post feed).
Hope this helps.

Instagram API review submission - complete app needed?

I just noticed that new Instagram API's sandbox has too many restrictions and I would need to submit review to build my app. I googled to see if there's a way around but looks like using their API would be better than anything.
The app I was going to build requires all the API endpoints that Instagram doesn't allow Sandbox users to access (such as hashtag search and get recent tags). Do I just build one assuming I can get responses from the endpoints? I am pretty confused. Anything would help. Thanks!
You think you have two options:
Since, instagram allows you get the contents from the user's in the sandbox mode.
Create an App using link and submit for review to get experience with public data available in instagram.

How to use instagram API on different websites

My company has different websites for different customers, each of them using instagram API to retrieve pictures from customer's instagram account.
I have tried to register different instagram clients but it has been rejected because 'We don't approve multiple submissions for the same company. Please consolidate all your integrations under a single client_id.'
How one would solve this problem ? An instagram client has its own website url, privacy policy url and redirect_url which obviously can't be shared between different websites.
It sounds like you are trying to get your client approved to "go live"... does it meet one of their only three acceptable use cases (since June 1st 2016)?
“My app allows people to login with Instagram and share their own
content”
“My product helps brands and advertisers understand, manage
their audience and media rights.”
“My product helps broadcasters and
publishers discover content, get digital rights to media, and share
media with proper attribution.”
If your use case doesn't fit their new agenda you will never get it approved to go live no matter how consolidated it is. Your only other option is to stay in Sandbox mode. First read about the limitations of Sandbox mode and if these are acceptable, then you don't have to worry about submission process at all. Just create multiple API clients and leave them in Sandbox mode forever. But if you're doing anything besides showing a few recent photos on your customer's sites, Sandbox mode probably won't cut it for you and you may be out of luck.

Does Instagram approve client apps that want to show an public hashtag feed on their website?

I am working at a agency that used to add Instagram hashtag & user feeds on websites. My old applications still work until june this year (https://www.instagram.com/developer/changelog/). Then they will need to be approved by Instagram to get out of sandbox mode.
I understand that we need an valid access token with: public_content permission scope. I read many people having their applications denied by Instagram.
When I read their permissions review (https://www.instagram.com/developer/review/) on the developer part of their site I came across this question:
My company is working with multiple clients, should I submit one app
per project? No, we do not approve apps that are created for one-off
projects (e.g. a hashtag campaign, an event, a website). You should
use a single client_id across all your integrations.
Do they approve applications that reuses its client_id for several projects? For example if I would want to develop an application/client which whole purpose would be to show one public instagram hashtag feed on websites. Would that get approved by Instagram if I reused the applications client_id over several projects?
Your use case is not approved. So your client will not get approved to "go live". You can still make these tag requests in Sandbox mode, but you will only get results from your last 20 posts. This short article explains how the Instagram API works since June 1st.
If you can work around the 20-post restriction, you can use this tool to manually generate an Instagram API token with the necessary public_content scope.
I don't think so.
I have requested public_info permission for an application simialr to yours but "DECLINED"
Try to request the permission with a good screencast video on how to use it and might be work. who knows.
Regards.

Resources