Instagram realtime API rate limits - api

I was using Instagram realtime API for some time and everything was working fine. I have only one subscription on users.
Lately it started to behave totally strange. I'm not getting all of the content, and there's no way to find any pattern. Every request triggers a log right when it hits my server so I can tell whether or not Instagram notifies me about the new content pretty accurately.
I'm starting to suspect that rate-limit is causing this problems. Does anybody knows if there's some rate-limit that can cause that behavior? Did anybody else have similar problems with the Instagram real-rime API ?

There is a rate limit of 5000/post/hour [BY experience and best of my knowledge]
However Instagram is very good in explaining the root cause so, if you see the error message it would clearly say "RateLimitExceeded" or what ever the root cause may be.

Related

A strange problem with the last step of the Oauth2 authentication

Well like the title suggest I am having a strange problem with the api oauth2.0 I wanted to play with the API in the sandbox before deploying live like any sane person to start pulling call recordings. Well when I was setting up the Oauth and it was a pain but I got to work, or at least I thought until it asked me to add an address for the sandbox profile after accepting all the other steps in order to go any father. Every time I tried to add the address from the zapier login window it kept telling me it failed to try again later. I thought no big deal I will just add it from the user profile and well what do you know that didn't work either. I than made a new extension with a new number and email to see if it was just the account that was messed up, or if the dev account couldn't use the api for whatever reason but again no dice same problems all the way down. I even tried using three different browser to see if anything would change but no dice (not like that really matters everything is chrome based these days). I am wondering if anyone else has had this problem, did I miss something really simple that I am clearly over looking since I am running on 4 hours of sleep for the last two days.
If anyone could help I would appreciate it, love a very tired programmer.
In case anyone runs into the same problems, make sure when making a POST request to ring central you put the paramotors in the body of the request.

instagram retrieve hashtag images - update June 1

I am aware of the update to Instagram apis. I have read through the documentation regarding fetching hashtag images. I'm confused regarding 2 points -
They have a section "Endpoints", which gives the url for fetching images using tags - https://api.instagram.com/v1/tags/{tag-name}?access_token=ACCESS-TOKEN
At the same time, when i try to submit for review (under Permissions Review section), in order to get access token, i get this message -
"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)."
The 2nd point makes me believe that Instagram has stopped sharing hashtag images to apis, at the same time i can find a lot of widgets still fetching hashtag images. How do they do that? Can anyone point me in the right direction?
The 2nd point makes me believe that Instagram has stopped sharing hashtag images to apis,
Correct. Instagram has made business decision to block most developers from accessing this content.
at the same time i can find a lot of widgets still fetching hashtag images.
This doesn't tell you much. They might have gotten their app approved for other purposes. Also it appears that Instagram has made some exceptions for big apps (like Tinder). Life is not fair.
How do they do that? Can anyone point me in the right direction?
You probably cannot. 99% of the use cases are not allowed and so they will reject your app if you try to submit it. Read this short article about what you can and cannot do with the new Instagram API
The other widgets you are talking about probably have presented Instagram with one of the valid use cases to fetch the data. They are able to get only the public content. This new restriction is probably a business decision. If you would still want to get the data you are looking for, you shopuld possibly go to a third party data provider who sell such data

direct message sync issue with twitter API

I am using the twitter api to get all direct messages
while testing I tried to delete a message from the twitter website and then tried to reload my app's direct message page (get via api) - the dm I deleted was still showing in my app but it wasn't on the account I was using on the website.
I'm not sure whats going on here, any help is appreciated
You usually should give a second after an update/delete operation on Twitter. If you do, I would say that something is going wrong with your code.

APISubscriptionError 400 Unable to reach callback URL

I found a lot of posts about this issue, but none is like mine.
I have a website that subscribes to IG real-time updates. Since some time ago trying to subscribe to new notifications returns the above error. Seems like IG can't reach the callback_url.
Interesting findings while troubleshooting:
I tried to manually (directly) access the callback_url and it works flawlessly.
When I run the site on my local machine and make sure the callback_url is to my server + the verify_token is a valid one then it all works as it should! IG reaches the callback_url.
I used the apigee console to make the subscription request and there it sometimes works.. Meaning - I craft the request to IG API and click Send. If it fails then I click again (I don't change parameters) and then it works..
Web server logs are in line with the results I get (when it complains it can't reach then there's no log of a request).
Does anyone have any tip or suggestion how to fix this?
Thanks!
While chasing my own tail for a solution I also contacted IG support. I described the issue using same description as above.
After 2 weeks suddenly everything started working again. Magic! Suddenly no errors at all! Needless to say nothing has changed on my end (hardware / network / code).
I didn't receive any response from their support, but considering that a previous email to them a few months ago took about 2 weeks to answer then I am quite sure some support guy simply fixed the issue on their side and didn't even bother to let me know what was going on.
This could be related to the fact that they killed most of their real time notifications API.
Anyway, leaving this here so that if anyone encounters a similar issue then just know you may need to email IG support.

How to authenticate docker hub api request?

I have been trying for the past several hours to make an authenticated request to the docker hub api. First of all, let me say that their documentation is very unclear. There are several different subdomains that you have to cycle through. The ones I have seen are index.dockerhub.io, registry-1.docker.io/v1/ auth.docker.com/token. There were others. But you get the point. Its like their api is managed by 30 different people or something and they forgot to have a meeting about how to unify their api. It feels like I have read just about everything I could find on the internet about how to do what I am trying to do, and it still is very unclear to me what I am supposed to do.
Their documentation states that I am supposed to get an auth token before making certain request. Ok. Fine. How do I do that? I got lucky and stumbled across the endpoint, https://auth.docker.io/v2/token/ no thanks to their api. I found it by just guessing. I don't know that version 2 is capable of even doing what I am trying to do.
What steps do I need to take to make authenticated request to the dockerhub api. What I am trying to do more specifically, is I am trying to query information about the given images that are on the hub, like the size of the images, and the basic port information that is available. I know its possible, because I have used services that do it. So, how do you properly authenticate request to get this information?
So after a few more hours of working on this problem, I came across someone who had similar issues and wrote a blog post about exactly how to solve it. The short answer is the endpoint that was missing from the docker api documentation is https://cdn-registry-1.docker.io/v1/. Why didn't they document their api better? I don't know. If anyone wants to read the full article about how this is done, you can find it at http://www.appcontainers.com/requesting-image-information-using-the-public-docker-api/
This was the most helpful article I have found on the subject. Hopefully this will help some other poor soul who is trapped in the confusion known as the docker api.