My app worked for a year and then the API calls to instagram stopped returning any data.
I use the following instagram endpoint:
https://api.instagram.com/v1/media/search?lat=48.858844&lng=2.294351&access_token=MY_TOKEN
I noticed I need the public_content permission but.. what Instagram requires in order to give me this permission? I couldn't understand anything from the documentation and they dissapproved my request for this permission.
The Instagram API Platform can be used to build non-automated, authentic, high-quality apps and services that:
Help individuals share their own content with 3rd party apps.
Help brands and advertisers understand, manage their audience and
media rights.
Help broadcasters and publishers discover content, get digital rights to media, and share media with proper attribution.
Best way to get public content permission is register an client application follow in one of those tree categories above, fill use case carefully with an screencast of you application and cross your fingers ;).
Leonel's answer is not correct. You get the public_content scope for your app by re-requesting an auth token with that additional permission. This has nothing to do with Sandbox mode or Live mode. This can be done for Live and Sandbox apps, but inclusiveness of the results will be determined by which mode you are in. Even when you have public_content scope for a Sandbox Mode app, you can only see the public content from sandbox users you invite to your client.
So Leonel is partially correct in the sense that the permissions problem may not even matter to you if you cannot get your client approved.
Read this short explanation of Instagram scopes and modes.
Related
I'm struggeling with the Instagram Permssion Request. We need to use the API to scan for new uploads to Instagram with a specific hashtag, to trigger a machine.
For this, i tried to request the permission for "basic" and "public content". The request was declined for several times, primarily because the screencast does not contain any Instagram login process in our app. Since there is no need to login for our purpose, i dont know how to realize this. We also dont want to use any 3rd party tool, but just the Instragram API. Do you have any advice for this?
Instagram does not approve one-off projects for yourself, they only give permission if you are creating an app or platform for many to use.
https://www.instagram.com/developer/authorization/
One-off Projects. If you are an agency building websites or other
integrations, note that we don't grant permissions to clients created
for one-off projects. If you are interested in building a product,
platform, or widget that will be used as a service across multiple
projects, then you may submit a single client_id that you can use
across multiple projects.
If you are creating an app/platform you have to have a login flow for each customer to login and use, so you have show login flow in video screencast.
If you are not building an app/platform for wide audience, you probably will not get permission and are expected to use other apps out there that do what you want to do.
Also checkout the Instagram Graph API, this is API for business accounts to create one-off projects to moderate your accounts, but you will not have access to public hashtag posts, you will have access to all content for your account: https://developers.facebook.com/docs/instagram-api/v2.10
Is it possible? I have read the documentation but I wish to know there is one way. I need to create a gallery with some hashtags and filter by some users. Maybe something in the backend can do it?
No. From the official api, you can't get other users' media anymore. They only allow developers or users to fetch their own "RECENT" media. So does hashtags.
More and more restrictions and fewer and fewer APIs opened by Instagram, it's hard to do valuable stuff around IG now.
It is possible. The developer client key defaults to your own content in sandbox mode. You have to create a submission for approval, you can do this via: https://www.instagram.com/developer/clients/ and choose the client that you have created, then the permissions tab will allow you to apply.
I am going through the application process at the moment for our App, it is very difficult as Instagram are stringent.
I am developing an app which needs public_content scope of Live API and aware of new regulations of Instagram. After I complete my app, I will send it to Instagram for review. Issue that I wonder was, Is having a company is strictly required in order to have Live API permission ? Because I saw in documents that developers should show their apps' privacy policy and kind of stuffs.
I dont think you require to have a registered company, but your app/website should look serious and should solve a problem for brands/businesses as mentioned in the 3 approved use case by Instagram.
I used to have http://gramfeed.com for last 5 years and recently had to rename to https://www.picodash.com and refocus the service for more specific audience to get approval. It has to look professional and should NOT be a generic service to all users.
This was working fine for many months and now it's just a blank space. I get the following error: Error from Instagram: The access_token provided does not match an approved application. How can I get a new access_token for an existing client??
You need to check you application hasn't been put into sandbox by Instagram. They made big changes to their API on the 1st of June and if you had it submitted your app for review it will be put in sandbox mode and only sandbox users will be able to use it.
Even if you are not in sandbox mode you may need to get your users to reaurhorize your app due to new scopes being used to control access to everything other than basic user information.
Check Instagram Developer Docs for more information on the changes
You need to check your Access token's Scope and asking for login permission
where some new Scope had been added ex:public_content Added. Also don't forget to check for requirements Scope for API you are using and if it's need and Authentications "Valid access Token". where also had some changes.
basic - to read a user’s profile info and media
public_content to read any public profile info and media on a user’s behalf
follower_list to read the list of followers and followed-by users
comments - to post and delete comments on a user’s behalf
relationships - to follow and unfollow accounts on a user’s behalf
likes - to like and unlike media on a user’s behalf
And take look about **Sandbox API behavior of your application not life yet :**
API Behavior
The behavior of the API when you are in sandbox mode is the same as when your app is live, but comes with the following restrictions:
Data is restricted to sandbox users and the 20 most recent media from each sandbox user
Reduced API rate limits
The first point is important and it means that the API behaves as if the only users on Instagram were your sandbox users, and the only media ever posted were the last 20 for each of these users.
For example, if you query the /users/{user-id}/ endpoint and the {user-id} is a sandbox user, then you will get the normal API response; but if the {user-id} is not a sandbox user, you will get a APINotFound error.
As another example, let's consider an endpoint that returns a list of media: /tags/{tag-name}/media/recent. The response returned by this endpoint will contain only media with the given tag, as expected. But instead of returning media from any public Instagram user, it will return only media that belongs to your sandbox users, restricted to the last 20 for each user.
Good luck
The following video clearly explains what steps to follow to get this working with the new auth
https://www.youtube.com/watch?v=0k4RhTS94Hw
Kind Regards
Sandeep Sahoo
Querying the Instagram API in Sandbox mode for getting the media liked by the user related to the token, I get no data. Of course the user is authorized to use the App in Sandbox.
GET: https://api.instagram.com/v1/users/self/media/liked?access_token=ACCESS-TOKEN
(Indeed the ACCESS-TOKEN part is substituted with the real token get after the Authorization.)
Response: {"pagination": {}, "meta": {"code": 200}, "data": []}
Am I getting nothing because is in Sandbox mode or am I missing something?
Sorry, I couldn't comment under your question because I don't have 50 reputation yet. However, if you have not submitted your app for review yet, then you don't have the public_content scope, which is required if you want to use the endpoint https://api.instagram.com/v1/users/self/media/liked?access_token=ACCESS-TOKEN.
According to Instagram API Documentation:
The OAuth 2.0 specification allows you to specify the scope of the access you are requesting from the user. All approved apps have basic access by default, but if you plan on asking for extended access such as reading public content, liking, commenting, or managing friendships, you will need to specify these scopes in your authorization request. Note that in order to use these extended permissions, you must first submit your app for review.
After you have gained permission to public_content, then you should be able to get the dataset from Instagram.
Did you figure it out? I had the same issue with #tags and just popped this in the browser.
https://api.instagram.com/oauth/authorize/?client_id=CLIENT_ID&redirect_uri=REDIRECT_URI&response_type=code&scope=public_content
The main factor being the scope=public_content.
Obviously you need to change the capitalised parts, but that should get you what your after.
Seeing as you are in sandbox mode and only requesting liked media, I thought Instagram wouldnt require app approval?